SPMRJ09900_CarePlan상용구.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMRJ09900" position="absolute 0 0 700 400" titletext="Care Plan 상용구" onload="SPMRJ09900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="상용구" position="absolute 0 0 200 24" id="caption5" class="tit_1"/>
  8. <Button position="absolute 578 369 634 391" id="button1" class="btn4" text="확인" onclick="button1_onclick"/>
  9. <Static position="absolute 8 28 241 52" align="align:center middle;" id="caption10" class="tit_2"/>
  10. <Shape position="absolute 6 36 691 37" linetype="vertical" id="line7" class="line_1"/>
  11. <Button position="absolute 638 369 694 391" id="button43" class="btn4" text="취소" onclick="button43_onclick"/>
  12. <Grid position="absolute 20 270 555 390" id="datagrid1" class="datagrid2" visible="false" binddataset="ds_temp_comnuseilst">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="300"/>
  17. <Column size="171"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24"/>
  22. </Rows>
  23. <Band id="head">
  24. <Cell text="problem"/>
  25. <Cell col="1" text="Care Plan Goal"/>
  26. </Band>
  27. <Band id="body">
  28. <Cell text="bind:cdnm"/>
  29. <Cell col="1" text="bind:refcdnm"/>
  30. </Band>
  31. </Format>
  32. </Formats>
  33. </Grid>
  34. <Button position="absolute 445 370 573 392" id="button2" class="btn4" visible="false" text="인스턴스 전달" onclick="button2_onclick"/>
  35. <Grid position="absolute 4 51 694 367" id="datagrid99" class="datagrid2" binddataset="ds_init_A000000002" oncellclick="datagrid99_oncellclick">
  36. <Formats>
  37. <Format id="default">
  38. <Columns>
  39. <Column size="300"/>
  40. <Column size="40"/>
  41. <Column size="325"/>
  42. <Column size="0"/>
  43. </Columns>
  44. <Rows>
  45. <Row size="24" band="head"/>
  46. <Row size="24"/>
  47. </Rows>
  48. <Band id="head">
  49. <Cell text="problem"/>
  50. <Cell col="1" text="선택"/>
  51. <Cell col="2" text="Care Plan&amp;Goal"/>
  52. <Cell col="3"/>
  53. </Band>
  54. <Band id="body">
  55. <Cell text="bind:cdnm"/>
  56. <Cell col="1" text="bind:selectedSub" edittype="checkbox" displaytype="checkbox"/>
  57. <Cell col="2" enable="false" text="bind:refcdnm" edittype="text" displaytype="text"/>
  58. <Cell col="3" text="bind:refcdno"/>
  59. </Band>
  60. </Format>
  61. </Formats>
  62. </Grid>
  63. </Layout>
  64. </Layouts>
  65. <Objects>
  66. <Dataset id="ds_temp_comnuseilst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  67. <ColumnInfo>
  68. <Column id="cdnm" type="STRING"/>
  69. <Column id="refcdnm" type="STRING"/>
  70. </ColumnInfo>
  71. </Dataset>
  72. <Dataset id="ds_init_A000000002" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  73. <ColumnInfo>
  74. <Column id="cdnm" type="STRING"/>
  75. <Column id="selectedSub" type="STRING"/>
  76. <Column id="refcdnm" type="STRING"/>
  77. <Column id="refcdno" type="STRING"/>
  78. </ColumnInfo>
  79. </Dataset>
  80. <Dataset id="ds_init_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  81. <ColumnInfo>
  82. <Column id="workflag" type="STRING" size="256"/>
  83. </ColumnInfo>
  84. <Rows>
  85. <Row>
  86. <Col id="workflag">002</Col>
  87. </Row>
  88. </Rows>
  89. </Dataset>
  90. <Dataset id="ds_init_pinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  91. <ColumnInfo>
  92. <Column id="workflag" type="STRING" size="256"/>
  93. </ColumnInfo>
  94. <Rows>
  95. <Row/>
  96. </Rows>
  97. </Dataset>
  98. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  99. <ColumnInfo>
  100. <Column id="workflag" type="STRING" size="256"/>
  101. </ColumnInfo>
  102. <Rows>
  103. <Row/>
  104. </Rows>
  105. </Dataset>
  106. <Dataset id="ds_careplanlists" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  107. </Objects>
  108. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  109. * System Name :
  110. * Job Name :
  111. * Creator :
  112. * Make Date : 2015-02-23
  113. * Description :
  114. *---------------------------------------------------------------------------------------
  115. * Modify Date Modifier Modify Description
  116. *---------------------------------------------------------------------------------------
  117. * 2015-02-23 Live Converter TF->XP
  118. *
  119. *---------------------------------------------------------------------------------------
  120. ****************************************************************************************/
  121. include "com_commonxp::comm_main.xjs";
  122. include "emr_prcpmngtxp::MMOCommon.xjs";
  123. include "emr_prcpmngtxp::MMO001.xjs";
  124. //include "emr_jcimngtxp::SPMRJ09900.xjs";
  125. var arErrorCode = new HashArray();
  126. function SPMRJ09900_onload(obj:Form, e:LoadEventInfo)
  127. {
  128. frmf_initForm(obj);
  129. fInit();
  130. }
  131. function button1_onclick(obj:Button, e:ClickEventInfo)
  132. {
  133. fOnClickOkBtn();
  134. }
  135. function button43_onclick(obj:Button, e:ClickEventInfo)
  136. {
  137. fClose();
  138. }
  139. function button2_onclick(obj:Button, e:ClickEventInfo)
  140. {
  141. fOnClickAddInstance();
  142. }
  143. function datagrid99_oncellclick(obj:Grid, e:GridClickEventInfo)
  144. {
  145. fCheckedGrd();
  146. }
  147. /* ---------------------------------------------------------------------
  148. Count List 관리 (SMMNP00320_CountList관리.xrw - JScript )
  149. - Version :
  150. 1) : Ver.1.00.01
  151. : Create By taebum
  152. : 2008-11-21 오전 10:05:51
  153. ---------------------------------------------------------------------- */
  154. /* --------------------------------------------------*/
  155. /* type : function */
  156. /* access : public */
  157. /* desc : xforms-ready시 수행한다 */
  158. /* return : */
  159. /* --------------------------------------------------*/
  160. function fInit() {
  161. // model.removeNodeSet("/root/main/careplanlists/careplanlist");
  162. ds_careplanlists.clear();
  163. var vWorkflag = "";
  164. var vTitle = "기타 Care Plan";
  165. var vMaincdidvalue = "";
  166. if (frmf_isPopup()) {
  167. vWorkflag = opener.frmf_getParameter("SPMRJ09900_workflag");
  168. if(utlf_isNull(vWorkflag)){
  169. alert("직종구분 값 세팅이 안되었습니다...!");
  170. this.close();
  171. }
  172. dsf_makeValue(ds_init_pinfo,"workflag" ,"string" , vWorkflag);
  173. }else{
  174. button43.visible = false;
  175. vWorkflag = frmf_getParameter("SPMRJ09900_workflag");
  176. if(utlf_isNull(vWorkflag)){
  177. alert("직종구분 값 세팅이 안되었습니다...! 임시테스로 002 세팅함");
  178. vWorkflag = "002";
  179. }
  180. dsf_makeValue(ds_init_pinfo,"workflag" ,"string" , vWorkflag);
  181. }
  182. if (vWorkflag=="001"){
  183. vTitle = "Treatment Plan";
  184. vMaincdidvalue = "A000000001";
  185. }else if(vWorkflag=="002"){
  186. vTitle = "Discharge Plan";
  187. vMaincdidvalue = "A000000002";
  188. }else if(vWorkflag=="003"){
  189. vTitle = "Nursing Care Plan";
  190. vMaincdidvalue = "A000000003";
  191. }else if(vWorkflag=="004"){
  192. vTitle = "Nutrition Management Plan";
  193. vMaincdidvalue = "A000000004";
  194. }else if(vWorkflag=="005"){
  195. vTitle = "Activity/Rehabilitation Plan";
  196. vMaincdidvalue = "A000000005";
  197. }else if(vWorkflag=="999"){
  198. vTitle = "기타 Care Plan";
  199. vMaincdidvalue = "A000000999";
  200. }
  201. caption10.text = vTitle;
  202. //테이블에 데이타 없음 2015-02-24
  203. //emrfGetCodeList(new Array(vMaincdidvalue), new Array("/root/init/"+vMaincdidvalue),"Y","Y");
  204. //var codeNodeSize = getNodesetCount("/root/init/"+vMaincdidvalue+"/"+vMaincdidvalue);
  205. // if (codeNodeSize > 0) {
  206. //
  207. // datagrid99.nodeset = "/root/init/"+vMaincdidvalue+"/"+vMaincdidvalue;
  208. //
  209. // datagrid99.mergecol(2)=false;
  210. //
  211. // datagrid99.mergecells = "byrestriccol";
  212. // }
  213. //
  214. fSetDatagrid();
  215. }
  216. /**
  217. * Count List 등록 내역 조회
  218. *
  219. */
  220. function fSelectCodeList(){
  221. dsf_makeValue(ds_send,"pid" ,"string" , ds_init_pinfo.getColumn(0,"pid"));
  222. dsf_makeValue(ds_send,"orddd" ,"string" , ds_init_pinfo.getColumn(0,"orddd"));
  223. dsf_makeValue(ds_send,"cretno" ,"string" , ds_init_pinfo.getColumn(0,"cretno"));
  224. dsf_makeValue(ds_send,"workflag" ,"string" , ds_init_pinfo.getColumn(0,"workflag"));
  225. if(utlf_isNull(ds_send.getColumn(0,"workflag"))){
  226. alert("전달받은 작업 구분자 영역이 없습니다...!")
  227. return;
  228. };
  229. }
  230. function fSetDatagrid(){
  231. var vDataGridSize = this.ds_init_A000000002.rowcount;
  232. for(i=0; i < vDataGridSize; i++){
  233. if(ds_init_A000000002.getColumn(i,"cdno") == "000000001"){
  234. // datagrid99.cellstyle("background-color", i, 1, i, 3) = "#CEEBFF";
  235. for(var colno = 0; colno < datagrid99.getCellCount("Head"); colno++)
  236. {
  237. datagrid99.setCellProperty("body",colno,"background","color:EXPR(getColumn(currow,'cdno')=='000000001'?'#CEEBFF')");
  238. }
  239. if(ds_init_A000000002.getColumn(i,"refcdno") == "000000001"){
  240. //datagrid99.valueMatrix(i,2) ="true";
  241. ds_init_A000000002.setColumn(i,"selectedSub","1");
  242. }
  243. }
  244. }
  245. }
  246. function fOnClickOkBtn(){
  247. var gridRows = this.ds_init_A000000002.rowcount;
  248. var vAllCarePlan = "";
  249. var checkedRow = 0;
  250. for(i=0; i<gridRows;i++ )
  251. {
  252. var checkYn = ds_init_A000000002.getColumn(i,"selectedSub");
  253. if(checkYn=="1"){
  254. checkedRow = checkedRow +1;
  255. var vProblem = ds_init_A000000002.getColumn(i,"cdnm");
  256. var vCarePlan = ds_init_A000000002.getColumn(i,"refcdnm");
  257. if(utlf_isNull(vAllCarePlan)){
  258. vAllCarePlan = vAllCarePlan +vProblem+"▦"+vCarePlan
  259. }else{
  260. vAllCarePlan = vAllCarePlan+"▩"+vProblem+"▦"+vCarePlan
  261. }
  262. }
  263. }
  264. if(checkedRow==0)
  265. {
  266. alert("선택 된 상용구가 없습니다...!");
  267. }else
  268. {
  269. if (frmf_isPopup()) {
  270. opener.frmf_setParameter("SPMRJ09900_careplan",vAllCarePlan);
  271. opener.frmf_setParameter("SPMRJ09900_clickbtn","ok");
  272. this.close();
  273. }else
  274. {
  275. frmf_setParameter("SPMRJ09900_careplan",vAllCarePlan);
  276. frmf_setParameter("SPMRJ09900_clickbtn","ok");
  277. }
  278. }
  279. }
  280. function fCheckedGrd(){
  281. var currRow = ds_init_A000000002.rowposition;
  282. var checkedYn = ds_init_A000000002.getColumn(currRow,"selectedSub");
  283. var checkedRowValue = ds_init_A000000002.getColumn(currRow,"refcdno");
  284. var colEnableCol = "";
  285. var colEnableYN = "";
  286. var rowDefaultValue = "";
  287. if(checkedYn=="true"){
  288. colEnableYN = "true";
  289. colEnableCol = "#FFFFFF";
  290. rowDefaultValue = "";
  291. }else{
  292. colEnableYN = "false";
  293. colEnableCol = "#DDDDDD";
  294. rowDefaultValue = "직접입력(free text)";
  295. }
  296. if(checkedRowValue=="999999999"){
  297. datagrid99.cellAttribute("disabled", currRow, 3 ) = colDisabledYN;
  298. datagrid99.cellstyle("background-color", currRow, 3) = colDisabledCol;
  299. ds_init_A000000002.setColumn(currRow,"refcdnm",rowDefaultValue);
  300. }
  301. }
  302. function fClose(){
  303. opener.frmf_setParameter("SPMRJ09900_clickbtn","");
  304. this.close();
  305. }
  306. function fOnClickAddInstance(){
  307. var gridRows = datagrid99.rows;
  308. var checkedRow = 0;
  309. for(i=1; i<gridRows;i++ )
  310. {
  311. var checkYn = datagrid99.valueMatrix(i,2);
  312. if(checkYn=="true"){
  313. checkedRow = checkedRow+1;
  314. var vProblem = datagrid99.valueMatrix(i,1);
  315. var vCarePlan = datagrid99.valueMatrix(i,3);
  316. datagrid1.addRow();
  317. var cur_row = datagrid1.row;
  318. datagrid1.valueMatrix(cur_row, 1) = vProblem;
  319. datagrid1.valueMatrix(cur_row, 2) = vCarePlan;
  320. }
  321. }
  322. model.refresh();
  323. if(checkedRow==0)
  324. {
  325. alert("선택 된 상용구가 없습니다...!");
  326. return;
  327. }
  328. fSendComnUse();
  329. }
  330. function fSendComnUse(){
  331. if(frmf_checkOpener()){
  332. var nodepath = opener.frmf_getParameter("SSPMRJ09900_nodepath");
  333. alert(nodepath);
  334. if(utlf_isNull(nodepath)){
  335. // window.close();
  336. return;
  337. }else{
  338. var selectnode = opener.instance1.selectSingleNode(nodepath);
  339. if(selectnode == null){
  340. // window.close();
  341. return;
  342. }
  343. opener.model.copyNode(nodepath, root.temp.comnuselists);
  344. }
  345. opener.frmf_setParameter("SPMRJ09900_clickbtn", "ok");
  346. }else{
  347. sysf_messageBox("상위화면이 변경되어 데이터를 전달", "E001");
  348. }
  349. this.close();
  350. }
  351. ]]></Script>
  352. </Form>
  353. </FDL>