SMMNR00400_중증도및위험사정기준점수관리.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNR00400" position="absolute 0 0 1201 792" titletext="중증도 및 위험사정 기준점수 관리" oninit="SMMNR00400_oninit" onload="SMMNR00400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="중증도 및 위험사정 기준점수 관리" class="tit_1" position="absolute 0 0 270 25"/>
  8. <Div id="grp_sea" taborder="1" class="div_SA" position="absolute 0 25 1195 65">
  9. <Layouts>
  10. <Layout>
  11. <Combo id="cmb_clsflag1" taborder="16" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" visible="false" position="absolute 451 11 601 30" onitemchanged="grp_sea_cmb_clsflag1_onitemchanged">
  12. <Dataset id="innerdataset">
  13. <ColumnInfo>
  14. <Column id="codecolumn"/>
  15. <Column id="datacolumn"/>
  16. </ColumnInfo>
  17. <Rows>
  18. <Row>
  19. <Col id="codecolumn">1</Col>
  20. <Col id="datacolumn">일반병동</Col>
  21. </Row>
  22. <Row>
  23. <Col id="codecolumn">2</Col>
  24. <Col id="datacolumn">신생아 ICU</Col>
  25. </Row>
  26. <Row>
  27. <Col id="codecolumn">3</Col>
  28. <Col id="datacolumn">혈액투석</Col>
  29. </Row>
  30. <Row>
  31. <Col id="codecolumn">4</Col>
  32. <Col id="datacolumn">중환자실</Col>
  33. </Row>
  34. <Row>
  35. <Col id="codecolumn">5</Col>
  36. <Col id="datacolumn">정신과병동</Col>
  37. </Row>
  38. </Rows>
  39. </Dataset>
  40. </Combo>
  41. <Combo id="cmb_clsflag2" taborder="17" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" visible="false" position="absolute 451 11 601 30" onitemchanged="grp_sea_cmb_clsflag2_onitemchanged">
  42. <Dataset id="innerdataset">
  43. <ColumnInfo>
  44. <Column id="codecolumn"/>
  45. <Column id="datacolumn"/>
  46. </ColumnInfo>
  47. <Rows>
  48. <Row>
  49. <Col id="codecolumn">1</Col>
  50. <Col id="datacolumn">Humpty Dumpty Scale</Col>
  51. </Row>
  52. <Row>
  53. <Col id="codecolumn">2</Col>
  54. <Col id="datacolumn">Morse Scale</Col>
  55. </Row>
  56. </Rows>
  57. </Dataset>
  58. </Combo>
  59. <Static id="caption2" text="종 류 :" class="search_name" position="absolute 16 12 87 29"/>
  60. <Radio id="rdo_recflag" taborder="15" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 90 11 345 30" onitemchanged="grp_sea_rdo_recflag_onitemchanged">
  61. <Dataset id="innerdataset">
  62. <ColumnInfo>
  63. <Column id="codecolumn"/>
  64. <Column id="datacolumn"/>
  65. </ColumnInfo>
  66. <Rows>
  67. <Row>
  68. <Col id="codecolumn">1</Col>
  69. <Col id="datacolumn">중증도</Col>
  70. </Row>
  71. <Row>
  72. <Col id="codecolumn">2</Col>
  73. <Col id="datacolumn">낙상 위험사정</Col>
  74. </Row>
  75. <Row>
  76. <Col id="codecolumn">3</Col>
  77. <Col id="datacolumn">욕창 위험사정</Col>
  78. </Row>
  79. </Rows>
  80. </Dataset>
  81. </Radio>
  82. <Static id="caption3" text="분 류 :" class="search_name" position="absolute 376 13 448 30"/>
  83. <Static id="caption4" text="기 준 일 :" class="search_name" position="absolute 644 13 730 30"/>
  84. <Calendar id="input5" taborder="18" class="input_search" position="absolute 730 11 850 30" autoselect="true" autoskip="true" onchanged="grp_sea_input5_onchanged"/>
  85. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 933 9 939 31" anchor="top right"/>
  86. <Button id="button1" taborder="19" text="조회" class="btn1" position="absolute 956 9 1012 31" anchor="top right" onclick="grp_sea_button1_onclick"/>
  87. <Button id="button2" taborder="20" text="1차분류추가" class="btn4" position="absolute 1015 9 1119 31" anchor="top right" onclick="grp_sea_button2_onclick"/>
  88. <Button id="button10" taborder="21" text="저장" class="btn4" position="absolute 1122 9 1178 31" anchor="top right" onclick="grp_sea_button10_onclick"/>
  89. </Layout>
  90. </Layouts>
  91. </Div>
  92. <Grid id="grd_detlgrup" taborder="2" binddataset="ds_main_detlgrup_detlgruplist" useinputpanel="false" position="absolute 0 76 1195 784" autoenter="select" autofittype="col" cellsizingtype="col" anchor="all">
  93. <Formats>
  94. <Format id="default">
  95. <Columns>
  96. <Column size="24"/>
  97. <Column size="171"/>
  98. <Column size="200"/>
  99. <Column size="200"/>
  100. <Column size="200"/>
  101. <Column size="200"/>
  102. <Column size="200"/>
  103. <Column size="0"/>
  104. <Column size="0"/>
  105. <Column size="0"/>
  106. </Columns>
  107. <Rows>
  108. <Row size="24" band="head"/>
  109. <Row size="24"/>
  110. </Rows>
  111. <Band id="head">
  112. <Cell/>
  113. <Cell col="1" text="분류군코드"/>
  114. <Cell col="2" text="분류군명"/>
  115. <Cell col="3" text="시작점수"/>
  116. <Cell col="4" text="종료점수"/>
  117. <Cell col="5" text="시작일자"/>
  118. <Cell col="6" text="종료일자"/>
  119. <Cell col="7" text="stat"/>
  120. <Cell col="8" text="clsflag"/>
  121. <Cell col="9" text="recflag"/>
  122. </Band>
  123. <Band id="body">
  124. <Cell celltype="head"/>
  125. <Cell col="1" displaytype="text" edittype="normal" style="align:center middle;" text="bind:bspntcd"/>
  126. <Cell col="2" displaytype="text" edittype="normal" style="align:center middle;" text="bind:bspntnm"/>
  127. <Cell col="3" displaytype="text" edittype="text" style="align:center middle;" text="bind:frompnt" editlimit="3"/>
  128. <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:topnt" editlimit="3"/>
  129. <Cell col="5" displaytype="date" edittype="date" style="align:center middle;" text="bind:fromdd" calendardisplaynulltype="nulltext"/>
  130. <Cell col="6" displaytype="date" edittype="date" style="align:center middle;" text="bind:todd" calendardisplaynulltype="nulltext"/>
  131. <Cell col="7" displaytype="combo" edittype="combo" text="bind:stat"/>
  132. <Cell col="8" displaytype="text" edittype="text" text="bind:clsflag"/>
  133. <Cell col="9" text="bind:recflag"/>
  134. </Band>
  135. </Format>
  136. </Formats>
  137. </Grid>
  138. </Layout>
  139. </Layouts>
  140. <Objects>
  141. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  142. <ColumnInfo>
  143. <Column id="recflag" type="STRING" size="256"/>
  144. <Column id="clsflag" type="STRING" size="256"/>
  145. <Column id="fromdd" type="STRING" size="256"/>
  146. </ColumnInfo>
  147. <Rows>
  148. <Row>
  149. <Col id="recflag">1</Col>
  150. <Col id="clsflag"/>
  151. <Col id="fromdd"/>
  152. </Row>
  153. </Rows>
  154. </Dataset>
  155. <Dataset id="ds_main_detlgrup_detlgruplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_detlgrup_detlgruplist_oncolumnchanged">
  156. <ColumnInfo>
  157. <Column id="stat" type="STRING" size="256" sumtext="그리드상태"/>
  158. <Column id="clsflag" type="STRING" size="256" sumtext="분류구분"/>
  159. <Column id="recflag" type="STRING" size="256" sumtext="기록구분"/>
  160. <Column id="fromdd" type="STRING" size="256" sumtext="시작일자"/>
  161. <Column id="todd" type="STRING" size="256" sumtext="종료일자"/>
  162. <Column id="bspntcd" type="STRING" size="256" sumtext="분류군코드"/>
  163. <Column id="bspntnm" type="STRING" size="256" sumtext="분류군명"/>
  164. <Column id="frompnt" type="STRING" size="256" sumtext="시작점수"/>
  165. <Column id="topnt" type="STRING" size="256" sumtext="종료점수"/>
  166. </ColumnInfo>
  167. </Dataset>
  168. <Dataset id="ds_send_detlgrup" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  169. </Objects>
  170. <Bind>
  171. <BindItem id="item0" compid="grp_sea.rdo_recflag" propid="value" datasetid="ds_main_cond" columnid="recflag"/>
  172. <BindItem id="item1" compid="grp_sea.cmb_clsflag2" propid="value" datasetid="ds_main_cond" columnid="clsflag"/>
  173. <BindItem id="item2" compid="grp_sea.input5" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  174. <BindItem id="item3" compid="grp_sea.cmb_clsflag1" propid="value" datasetid="ds_main_cond" columnid="clsflag"/>
  175. </Bind>
  176. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  177. * System Name :
  178. * Job Name :
  179. * Creator :
  180. * Make Date : 2015-11-13
  181. * Description :
  182. *---------------------------------------------------------------------------------------
  183. * Modify Date Modifier Modify Description
  184. *---------------------------------------------------------------------------------------
  185. * 2015-11-13 Live Converter TF->XP
  186. *
  187. *---------------------------------------------------------------------------------------
  188. ****************************************************************************************/
  189. include "com_commonxp::comm_main.xjs";
  190. include "emr_carerecxp::SerDiag.xjs";
  191. function SMMNR00400_oninit(obj:Form, e:InitEventInfo)
  192. {
  193. frmf_initForm(obj);
  194. }
  195. function SMMNR00400_onload(obj:Form, e:LoadEventInfo)
  196. {
  197. grdf_initGrid(grd_detlgrup);
  198. grdf_setRowTypeIcon(grd_detlgrup, 0);
  199. grp_sea.rdo_recflag.value="1";
  200. fShowSearchCombo(grp_sea.rdo_recflag.value, 'grp_sea.caption3', 'grp_sea.cmb_clsflag1', 'grp_sea.cmb_clsflag2');
  201. fSearch();
  202. }
  203. function fSearch()
  204. {
  205. var fromdd = ds_main_cond.getColumn(0, "fromdd");
  206. var clsflag = ds_main_cond.getColumn(0, "clsflag");
  207. var recflag = ds_main_cond.getColumn(0, "recflag");
  208. if(utlf_isNull(fromdd) || fromdd == '')
  209. {
  210. fromdd = utlf_getCurrentDate();
  211. }
  212. if(utlf_isNull(clsflag) || clsflag == '')
  213. {
  214. clsflag = '1';
  215. }
  216. if(utlf_isNull(recflag) || recflag == '')
  217. {
  218. recflag = '1';
  219. }
  220. if(recflag == '2')
  221. {
  222. if(clsflag != '1' && clsflag != '2')
  223. {
  224. clsflag = '1';
  225. }
  226. }
  227. else if(recflag == '3')
  228. {
  229. clsflag = '1';
  230. }
  231. dsf_makeValue(ds_main_cond, "clsflag", "string", clsflag);
  232. dsf_makeValue(ds_main_cond, "recflag", "string", recflag);
  233. dsf_makeValue(ds_main_cond, "fromdd", "string", fromdd);
  234. var oParam = {};
  235. oParam.id = "TRMNR00404";
  236. oParam.service = "carerecapp.AsesRec";
  237. oParam.method = "reqGetDetailGrupList";
  238. oParam.inds = "refCond=ds_main_cond";
  239. oParam.outds = "ds_main_detlgrup_detlgruplist=detlgruplist";
  240. oParam.async = false;
  241. //oParam.callback = "cf_TRMNR00404";
  242. tranf_submit(oParam);
  243. }
  244. function grp_sea_rdo_recflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  245. {
  246. fShowSearchCombo(obj.value, 'grp_sea.caption3', 'grp_sea.cmb_clsflag1', 'grp_sea.cmb_clsflag2');
  247. fSearch();
  248. }
  249. function grp_sea_cmb_clsflag2_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  250. {
  251. fSearch();
  252. }
  253. function grp_sea_cmb_clsflag1_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  254. {
  255. fSearch();
  256. }
  257. function grp_sea_input5_onchanged(obj:Calendar, e:ChangeEventInfo)
  258. {
  259. fSearch();
  260. }
  261. function grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
  262. {
  263. fSearch();
  264. }
  265. function grp_sea_button2_onclick(obj:Button, e:ClickEventInfo)
  266. {
  267. fAddRow();
  268. }
  269. function fAddRow()
  270. {
  271. var rowCnt = ds_main_detlgrup_detlgruplist.rowcount;
  272. var topnt = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "topnt");
  273. var fromdd = utlf_getCurrentDate();
  274. var todd = '99991231';
  275. var clsflag = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "clsflag");
  276. var recflag = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "recflag");
  277. rowCnt = ds_main_detlgrup_detlgruplist.addRow();
  278. if(rowCnt > 0)
  279. {
  280. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "frompnt", Number(topnt)+1);
  281. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "fromdd", fromdd);
  282. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "todd", todd);
  283. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "clsflag", clsflag);
  284. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "recflag", recflag);
  285. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "stat", "i");
  286. }
  287. else
  288. {
  289. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "clsflag", ds_main_cond.getColumn(0, "clsflag"));
  290. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "recflag", ds_main_cond.getColumn(0, "recflag"));
  291. ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "stat", "i");
  292. }
  293. }
  294. function grp_sea_button10_onclick(obj:Button, e:ClickEventInfo)
  295. {
  296. fSave();
  297. }
  298. function fIsValid()
  299. {
  300. if(ds_main_detlgrup_detlgruplist.rowcount == 0)
  301. {
  302. return false;
  303. }
  304. var bspntcd, bspntnm, frompnt, topnt, fromdd, todd;
  305. var _bspntcd, _fromdd, _frompnt, _topnt;
  306. var endCd, edcdStr;
  307. for(var i = 0; i < ds_main_detlgrup_detlgruplist.rowcount; i++)
  308. {
  309. bspntcd = ds_main_detlgrup_detlgruplist.getColumn(i, "bspntcd");
  310. bspntnm = ds_main_detlgrup_detlgruplist.getColumn(i, "bspntnm");
  311. frompnt = ds_main_detlgrup_detlgruplist.getColumn(i, "frompnt");
  312. topnt = ds_main_detlgrup_detlgruplist.getColumn(i, "topnt");
  313. fromdd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(i, "fromdd"));
  314. todd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(i, "todd"));
  315. if(utlf_isNull(bspntcd))
  316. {
  317. sysf_messageBox(parseInt(i+1) + "번째 분류군의 분류군코드를","C001");
  318. return false;
  319. }
  320. if(utlf_isNull(bspntnm))
  321. {
  322. sysf_messageBox(parseInt(i+1) + "번째 분류군의 분류군명을","C001");
  323. return false;
  324. }
  325. if(utlf_isNull(frompnt))
  326. {
  327. sysf_messageBox(parseInt(i+1) + "번째 분류군의 시작점수를","C001");
  328. return false;
  329. }
  330. if(utlf_isNull(topnt))
  331. {
  332. sysf_messageBox(parseInt(i +1)+ "번째 분류군의 종료점수를","C001");
  333. return false;
  334. }
  335. for(var j = (i+1); j < ds_main_detlgrup_detlgruplist.rowcount; j++)
  336. {
  337. _bspntcd = ds_main_detlgrup_detlgruplist.getColumn(j, "bspntcd");
  338. _fromdd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "fromdd"));
  339. _frompnt = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "frompnt"));
  340. _topnt = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "topnt"));
  341. if(bspntcd == _bspntcd && fromdd == _fromdd)
  342. {
  343. sysf_messageBox(parseInt(i+1) + '번째와 ' + parseInt(j +1)+ '번째의 분류군코드와 시작일자가 중복입력 되었습니다. 분류코드나 시작일자를 다시',"C001");
  344. return false;
  345. }
  346. if(frompnt >= _frompnt && frompnt <= _topnt && todd == '99991231')
  347. {
  348. edcdStr = '입력하신 ' + parseInt(j+1) + '번째의 시작점수(' + _frompnt + ')는 ' + parseInt(i+1) + '번째의 점수(' + frompnt + '~' + topnt + ')에 포함됩니다. ';
  349. edcdStr += parseInt(i+1) + '번째의 종료일자를 ' + parseInt(j+1) + '번째의 시작일자 이전일로 변경';
  350. endCd = sysf_messageBox(edcdStr, 'Q002');
  351. if(endCd == 6)
  352. {
  353. //ds_main_detlgrup_detlgruplist.updatecontrol = false;
  354. ds_main_detlgrup_detlgruplist.setColumn(i, "todd", ds_main_detlgrup_detlgruplist.getColumn(j, "fromdd").toDate().getAddDate(-1, "D").getDateFormat());
  355. ds_main_detlgrup_detlgruplist.setColumn(i, "stat", "u");
  356. //ds_main_detlgrup_detlgruplist.updatecontrol = true;
  357. }
  358. else if(endCd == 7)
  359. {
  360. return false;
  361. }
  362. }
  363. }
  364. if(fromdd > todd)
  365. {
  366. sysf_messageBox(parseInt(i+1) + "번째 분류군의 시작일자가 종료일자보다 클 수","I004");
  367. return false;
  368. }
  369. }
  370. return true;
  371. }
  372. function fSave()
  373. {
  374. if(fIsValid())
  375. {
  376. var update = grdf_getGridUpdateData(grd_detlgrup, "all")
  377. ds_send_detlgrup.copyData(update);
  378. var oParam = {};
  379. oParam.id = "TXMNR00402";
  380. oParam.service = "carerecapp.AsesRec";
  381. oParam.method = "reqExeDetailGrupInfo";
  382. oParam.inds = "detlgrup=ds_send_detlgrup";
  383. oParam.outds = "";
  384. oParam.async = false;
  385. oParam.callback = "cf_TXMNR00402";
  386. tranf_submit(oParam);
  387. }
  388. }
  389. function cf_TXMNR00402(sSvcId, nErrorCode, sErrorMsg)
  390. {
  391. if(nErrorCode < 0) return;
  392. else
  393. {
  394. fSearch();
  395. }
  396. }
  397. function ds_main_detlgrup_detlgruplist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  398. {
  399. if(ds_main_detlgrup_detlgruplist.getColumn(ds_main_detlgrup_detlgruplist.rowposition, "stat") != "i")
  400. ds_main_detlgrup_detlgruplist.setColumn(ds_main_detlgrup_detlgruplist.rowposition, "stat", "u");
  401. }
  402. ]]></Script>
  403. </Form>
  404. </FDL>