SPADC62400_NutritionLab.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPADC62400" position="absolute 0 0 498 331" titletext="Nutrition Lab" oninit="SPADC62400_oninit" onload="SPADC62400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 496 306" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="Nutrition Lab" position="absolute 0 7 110 27" id="caption1" class="tit_2" anchor="default"/>
  11. <Shape position="absolute 0 23 495 32" linetype="horizontal" id="line1" class="line_1" anchor="default"/>
  12. <TextArea position="absolute 5 205 495 300" id="textarea4" anchor="default" wordwrap="word"/>
  13. <CheckBox position="absolute 5 35 160 55" id="checkbox1" anchor="default" text="체중 주 1회" truevalue="1" onclick="CheckBox_onclick"/>
  14. <CheckBox position="absolute 5 60 271 80" id="checkbox2" anchor="default" text="Eyetone BS g 6hr(for 3days)" truevalue="2" onclick="CheckBox_onclick"/>
  15. <CheckBox position="absolute 5 180 279 200" id="checkbox4" anchor="default" text="lsolator Culture 주 1회" truevalue="10" onclick="CheckBox_onclick"/>
  16. <CheckBox position="absolute 5 85 238 105" id="checkbox3" anchor="default" text="주 2회(첫 2주동안), 주 1회(계속)" truevalue="3" onclick="CheckBox_onclick"/>
  17. <cp_checkboxList id="checkbox5" titletext="CheckBox List" taborder="1" text="cp_checkboxList00" scrollbars="none" position="absolute 23 102 496 181" style="background:transparent; " col="1" row="1" cellspacing="2" vcellspacing="0" itemWidth="100" itemHeight="20" overflow="visible" anchor="default"/>
  18. <Shape id="line00" class="line_1" position="absolute 0 22 495 31"/>
  19. <Shape id="line02" class="line_1" position="absolute 0 21 495 30"/>
  20. </Layout>
  21. </Layouts>
  22. </Div>
  23. <Button id="btn_cfm" taborder="1" text="확인" class="btn4" position="absolute 380 304 436 326" onclick="btn_cfm_onclick"/>
  24. <Button id="btn_cls" taborder="2" text="닫기" class="btn4" position="absolute 439 304 495 326" onclick="btn_cls_onclick"/>
  25. </Layout>
  26. </Layouts>
  27. <Objects>
  28. <Dataset id="ds_main_chk5" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  29. <ColumnInfo>
  30. <Column id="cdid" type="STRING" size="256"/>
  31. <Column id="cdnm" type="STRING" size="256"/>
  32. </ColumnInfo>
  33. <Rows>
  34. <Row>
  35. <Col id="cdid">4</Col>
  36. <Col id="cdnm">CBC</Col>
  37. </Row>
  38. <Row>
  39. <Col id="cdid">5</Col>
  40. <Col id="cdnm">FBS, BUN/Scr, OT/PT/Alk-P.cpk</Col>
  41. </Row>
  42. <Row>
  43. <Col id="cdid">6</Col>
  44. <Col id="cdnm">Na/K/Cl, Ca/P/Mg</Col>
  45. </Row>
  46. <Row>
  47. <Col id="cdid">7</Col>
  48. <Col id="cdnm">Pr/Alb, TRF, RBP, Prealbumine</Col>
  49. </Row>
  50. <Row>
  51. <Col id="cdid">8</Col>
  52. <Col id="cdnm">Chol/TG</Col>
  53. </Row>
  54. <Row>
  55. <Col id="cdid">9</Col>
  56. <Col id="cdnm">24hr Urine Urea &amp; Cr</Col>
  57. </Row>
  58. </Rows>
  59. </Dataset>
  60. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  61. <ColumnInfo>
  62. <Column id="chk1" type="STRING" size="256"/>
  63. <Column id="chk2" type="STRING" size="256"/>
  64. <Column id="chk3" type="STRING" size="256"/>
  65. <Column id="chk4" type="STRING" size="256"/>
  66. <Column id="chk5" type="STRING" size="256"/>
  67. <Column id="chk6" type="STRING" size="256"/>
  68. <Column id="chk7" type="STRING" size="256"/>
  69. <Column id="text1" type="STRING" size="256"/>
  70. <Column id="radio1" type="STRING" size="256"/>
  71. <Column id="returnstr" type="STRING" size="256"/>
  72. <Column id="text2" type="STRING" size="256"/>
  73. <Column id="chk5label" type="STRING" size="256"/>
  74. </ColumnInfo>
  75. <Rows>
  76. <Row>
  77. <Col id="chk1"/>
  78. <Col id="chk2"/>
  79. <Col id="chk3"/>
  80. <Col id="chk4"/>
  81. <Col id="chk5"/>
  82. <Col id="chk6"/>
  83. <Col id="chk7"/>
  84. <Col id="text1"/>
  85. <Col id="radio1"/>
  86. <Col id="returnstr"/>
  87. <Col id="text2"/>
  88. </Row>
  89. </Rows>
  90. </Dataset>
  91. <Dataset id="ds_hidden_checkvalue" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  92. <ColumnInfo>
  93. <Column id="label" type="STRING" size="256"/>
  94. <Column id="value" type="STRING" size="256"/>
  95. </ColumnInfo>
  96. <Rows>
  97. <Row>
  98. <Col id="label"/>
  99. <Col id="value"/>
  100. </Row>
  101. </Rows>
  102. </Dataset>
  103. <Dataset id="ds_hidden_receiveref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  104. <ColumnInfo>
  105. <Column id="path" type="STRING" size="256"/>
  106. <Column id="path2" type="STRING" size="256"/>
  107. <Column id="nutritionlab" type="STRING" size="256"/>
  108. <Column id="nutritionlabchk" type="STRING" size="256"/>
  109. </ColumnInfo>
  110. <Rows>
  111. <Row>
  112. <Col id="path"/>
  113. <Col id="path2"/>
  114. <Col id="nutritionlab"/>
  115. <Col id="nutritionlabchk"/>
  116. </Row>
  117. </Rows>
  118. </Dataset>
  119. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_tmep_oncolumnchanged">
  120. <ColumnInfo>
  121. <Column id="chk5data" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. <Rows>
  124. <Row/>
  125. </Rows>
  126. </Dataset>
  127. </Objects>
  128. <Bind>
  129. <BindItem id="item0" compid="grp_biz.checkbox1" propid="value" datasetid="ds_init" columnid="chk1"/>
  130. <BindItem id="item1" compid="grp_biz.checkbox2" propid="value" datasetid="ds_init" columnid="chk2"/>
  131. <BindItem id="item2" compid="grp_biz.checkbox3" propid="value" datasetid="ds_init" columnid="chk3"/>
  132. <BindItem id="item3" compid="grp_biz.checkbox4" propid="value" datasetid="ds_init" columnid="chk4"/>
  133. <BindItem id="item4" compid="grp_biz.textarea4" propid="value" datasetid="ds_init" columnid="returnstr"/>
  134. </Bind>
  135. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  136. * System Name :
  137. * Job Name :
  138. * Creator :
  139. * Make Date : 2015-11-13
  140. * Description :
  141. *---------------------------------------------------------------------------------------
  142. * Modify Date Modifier Modify Description
  143. *---------------------------------------------------------------------------------------
  144. * 2015-11-13 Live Converter TF->XP
  145. *
  146. *---------------------------------------------------------------------------------------
  147. ****************************************************************************************/
  148. include "com_commonxp::comm_main.xjs";
  149. /******************************************************************
  150. * Argument :
  151. * Description : 초기화
  152. ******************************************************************/
  153. function SPADC62400_oninit(obj:Form, e:InitEventInfo)
  154. {
  155. frmf_initForm(obj);
  156. }
  157. function SPADC62400_onload(obj:Form, e:LoadEventInfo)
  158. {
  159. try{
  160. ds_hidden_receiveref.copyData(arg_ds_hidden_receiveref);
  161. }catch(e){
  162. }
  163. ds_init.setColumn(0, "returnstr", ds_hidden_receiveref.getColumn(0, "nutritionlab"));
  164. var nutritionlabData5 = "" ;
  165. var nutritionlabData = "";
  166. if( !utlf_isNull(ds_hidden_receiveref.getColumn(0, "nutritionlabchk")) ){
  167. nutritionlabData = ds_hidden_receiveref.getColumn(0, "nutritionlabchk").split(",");
  168. }
  169. for( var i = 0; i < nutritionlabData.length; ++i ) {
  170. if( nutritionlabData[i] == "1" ) ds_init.setColumn(0, "chk1", nutritionlabData[i]);
  171. if( nutritionlabData[i] == "2" ) ds_init.setColumn(0, "chk2", nutritionlabData[i]);
  172. if( nutritionlabData[i] == "3" ) ds_init.setColumn(0, "chk3", nutritionlabData[i]);
  173. if( nutritionlabData[i] == "10" ) ds_init.setColumn(0, "chk4", nutritionlabData[i]);
  174. if( nutritionlabData[i] >= "4" && nutritionlabData[i] <= "9" ) {
  175. if( utlf_isNull(nutritionlabData5) ) nutritionlabData5 += nutritionlabData[i];
  176. else nutritionlabData5 += "," + nutritionlabData[i];
  177. }
  178. }
  179. if( !utlf_isNull(nutritionlabData5) ) ds_init.setColumn(0, "chk5", nutritionlabData5);
  180. //checkbox5
  181. var sProp1="col=2,row=3,cellspacing=5,vcellspacing=0,itemWidth=-1,itemHeight=27,overflow=''";
  182. grp_biz.checkbox5.setInitComp(sProp1, ds_main_chk5, "cdid", "cdnm", "fn_setCheckBox5");
  183. fn_getCheckBox5();
  184. }
  185. /******************************************************************
  186. * Argument :
  187. * Description : checkbox5 bind set
  188. ******************************************************************/
  189. function fn_setCheckBox5(obj){
  190. var getChkcd = getChkcd = String(grp_biz.checkbox5.getData()).replace(",", " ");
  191. ds_init.setColumn(0, "chk5", getChkcd);
  192. if(!utlf_isNull(getChkcd)){
  193. grp_biz.checkbox3.value = "3";
  194. }else{
  195. grp_biz.checkbox3.value = "";
  196. }
  197. makeReturnStr();
  198. }
  199. /******************************************************************
  200. * Argument :
  201. * Description : checkbox5 DBget
  202. ********************************************ale**********************/
  203. function fn_getCheckBox5(){
  204. if( !utlf_isNull(ds_init.getColumn(0, "chk5")) ) {
  205. chk5List = ds_init.getColumn(0, "chk5").split(",");
  206. grp_biz.checkbox5.setData(chk5List);
  207. }
  208. }
  209. /******************************************************************
  210. * Argument :
  211. * Description : checkbox Event
  212. ******************************************************************/
  213. function CheckBox_onclick(obj:CheckBox, e:ClickEventInfo)
  214. {
  215. makeReturnStr();
  216. }
  217. /******************************************************************
  218. * Argument :
  219. * Description : checkbox Event
  220. ******************************************************************/
  221. function ds_tmep_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  222. {
  223. makeReturnStr();
  224. }
  225. /******************************************************************
  226. * Argument :
  227. * Description : checkbox5 data 변경 시 Event
  228. ******************************************************************/
  229. function makeReturnStr(){
  230. ds_init.setColumn(0, "returnstr", "");
  231. var cnt = "1";
  232. var returnstr = "";
  233. if( ds_init.getColumn(0, "chk1") == "1" ){
  234. if(!utlf_isNull(returnstr)){
  235. cnt++;
  236. returnstr += "\n";
  237. }
  238. returnstr += cnt+") ";
  239. returnstr = returnstr + grp_biz.checkbox1.text;
  240. }
  241. if( ds_init.getColumn(0, "chk2") == "2" ){
  242. if(!utlf_isNull(returnstr)) {
  243. cnt++;
  244. returnstr += "\n";
  245. }
  246. returnstr += cnt+") ";
  247. returnstr = returnstr + grp_biz.checkbox2.text;
  248. }
  249. if( ds_init.getColumn(0, "chk3") == "3" ){
  250. if(!utlf_isNull(ds_init.getColumn(0, "chk5"))){
  251. if(!utlf_isNull(returnstr)) {
  252. cnt++;
  253. returnstr += "\n";
  254. }
  255. returnstr += cnt+") ";
  256. returnstr = returnstr + grp_biz.checkbox3.text + "\n";
  257. returnstr += String(grp_biz.checkbox5.getLableData());
  258. }
  259. }
  260. if( ds_init.getColumn(0, "chk4") == "10" ){
  261. if(!utlf_isNull(returnstr)) {
  262. cnt++;
  263. returnstr += "\n";
  264. }
  265. returnstr += cnt+") ";
  266. returnstr = returnstr + grp_biz.checkbox4.text;
  267. }
  268. //fn_setCheckBox5();
  269. ds_init.setColumn(0, "returnstr", returnstr);
  270. //2010-01-14 기존 Check된 내용을 그대로 check.
  271. var nutritionlabchk="";
  272. if( !utlf_isNull(ds_init.getColumn(0, "chk1")) ) nutritionlabchk += ds_init.getColumn(0, "chk1") + ",";
  273. if( !utlf_isNull(ds_init.getColumn(0, "chk2")) ) nutritionlabchk += ds_init.getColumn(0, "chk2") + ",";
  274. if( !utlf_isNull(ds_init.getColumn(0, "chk3")) ) nutritionlabchk += ds_init.getColumn(0, "chk3") + ",";
  275. if( !utlf_isNull(ds_init.getColumn(0, "chk4")) ) nutritionlabchk += ds_init.getColumn(0, "chk4") + ",";
  276. if( !utlf_isNull(ds_init.getColumn(0, "chk5")) ) nutritionlabchk += ds_init.getColumn(0, "chk5");
  277. ds_hidden_receiveref.setColumn(0, "nutritionlabchk", nutritionlabchk);
  278. }
  279. /******************************************************************
  280. * Argument :
  281. * Description : 확인 Button Event
  282. ******************************************************************/
  283. function btn_cfm_onclick(obj:Button, e:ClickEventInfo)
  284. {
  285. if ( frmf_checkOpener() ) {
  286. var receiveref = ds_hidden_receiveref.getColumn(0, "path");
  287. var col = ds_hidden_receiveref.getColumn(0, "column");
  288. var col2 = ds_hidden_receiveref.getColumn(0, "column2");
  289. opener.objects[receiveref].setColumn(0, col, grp_biz.textarea4.value);
  290. opener.objects[receiveref].setColumn(0, col2, ds_hidden_receiveref.getColumn(0, "nutritionlabchk"));
  291. this.close();
  292. } else {
  293. alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  294. }
  295. }
  296. /******************************************************************
  297. * Argument :
  298. * Description : 닫기 Button Event
  299. ******************************************************************/
  300. function btn_cls_onclick(obj:Button, e:ClickEventInfo)
  301. {
  302. this.close();
  303. }
  304. ]]></Script>
  305. </Form>
  306. </FDL>