SMANT01000_환자별식사력조회.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMANT01000" position="absolute 0 0 1164 805" titletext="환자별식사력조회" oninit="model1_oninit" onload="SMANT01000_onload" ontimer="SMANT01000_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption13" text="환자별식사력조회" class="tit_1" position="absolute 0 4 137 29"/>
  8. <Static id="caption10" text="환자선택" class="tit_2" position="absolute 0 102 97 122"/>
  9. <Button id="btn_excel1" taborder="3" text="엑셀" onclick="btn_excel1_onclick" onlbuttonup="btn_excel1_onlbuttonup" class="btn7" position="absolute 296 99 345 119"/>
  10. <Button id="btn_excel2" taborder="2" text="엑셀" onclick="btn_excel2_onclick" onlbuttonup="btn_excel2_onlbuttonup" class="btn7" position="absolute 1107 99 1156 119" anchor="top right"/>
  11. <Div id="roundrect1" anchor="left top right" taborder="9" applystyletype="apply" style="align:center top;transformation:0,0 ;" scrollbars="none" class="div_SA" position="absolute 0 29 1156 96">
  12. <Layouts>
  13. <Layout>
  14. <Static id="caption4" text="처방일자" class="search_name" position="absolute 8 10 76 30" anchor="default"/>
  15. <Calendar id="ipt_fromdd" taborder="34" dateformat="yyyy-MM-dd" class="input_s_essential" position="absolute 77 10 177 30" anchor="default" autoselect="true"/>
  16. <Static id="caption7" text="병동" class="search_name" position="absolute 8 35 70 55" anchor="default"/>
  17. <Combo id="cmb_ward" taborder="35" innerdataset="@ds_init_cmb_ward" codecolumn="deptcd" datacolumn="depthngnm" onitemchanged="roundrect1_cmb_ward_onitemchanged" class="combo_s_essential" position="absolute 77 35 177 55" anchor="default"/>
  18. <Static id="caption2" text="병실" class="search_name" position="absolute 206 35 248 55" anchor="default"/>
  19. <Combo id="cmb_room" taborder="36" innerdataset="@ds_init_cmb_room" codecolumn="wardroomcdid" datacolumn="wardroomcdnm" class="combo_s_essential" position="absolute 248 35 329 55" anchor="default" onitemchanged="roundrect1_cmb_room_onitemchanged"/>
  20. <Calendar id="ipt_todd" taborder="37" dateformat="yyyy-MM-dd" class="input_s_essential" position="absolute 193 10 293 30" anchor="default" autoselect="true"/>
  21. <Static id="caption11" text="재원구분" class="search_name" position="absolute 347 10 415 30" anchor="default"/>
  22. <Radio id="rdo_patflag" taborder="38" columncount="4" rowcount="0" index="0" codecolumn="codecolumn" datacolumn="datacolumn" value="0" onitemclick="roundrect1_rdo_patflag_onitemclick" class="radio_search" position="absolute 413 10 613 30" anchor="default">
  23. <Dataset id="innerdataset">
  24. <ColumnInfo>
  25. <Column id="codecolumn" size="256"/>
  26. <Column id="datacolumn" size="256"/>
  27. </ColumnInfo>
  28. <Rows>
  29. <Row>
  30. <Col id="codecolumn">0</Col>
  31. <Col id="datacolumn">전체</Col>
  32. </Row>
  33. <Row>
  34. <Col id="codecolumn">1</Col>
  35. <Col id="datacolumn">재원</Col>
  36. </Row>
  37. <Row>
  38. <Col id="codecolumn">2</Col>
  39. <Col id="datacolumn">퇴원</Col>
  40. </Row>
  41. <Row>
  42. <Col id="codecolumn">3</Col>
  43. <Col id="datacolumn">신환</Col>
  44. </Row>
  45. </Rows>
  46. </Dataset>
  47. </Radio>
  48. <Static id="caption5" text="진료과" class="search_name" position="absolute 347 35 433 55" anchor="default"/>
  49. <Combo id="cmb_orddept" taborder="39" innerdataset="@ds_init_cmb_orddept" codecolumn="deptcd" datacolumn="depthngnm" class="combo_s_essential" position="absolute 413 35 538 55" anchor="default"/>
  50. <Static id="caption3" text="식사" class="search_name" position="absolute 647 35 707 55" anchor="default"/>
  51. <Combo id="cmb_diet" taborder="40" innerdataset="@ds_init_cmb_diet" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 721 35 826 55" anchor="default"/>
  52. <Button id="btn_search" taborder="44" text="조회" onclick="btn_search_onclick" class="btn1" position="absolute 1093 10 1149 30" anchor="top right"/>
  53. <Static id="caption6" text="~" position="absolute 177 10 193 30" style="align:center middle;" anchor="default"/>
  54. <Static id="stt_pid" text="등록번호/환자명" class="search_name" position="absolute 648 9 764 29" anchor="left top"/>
  55. <Edit id="edt_pid" taborder="45" inputtype="number" maxlength="9" position="absolute 759 8 857 28" onkeydown="roundrect1_edt_pid_onkeydown" autoselect="true"/>
  56. <Edit id="edt_patnm" taborder="46" imemode="hangul" position="absolute 870 8 968 28" onkeydown="roundrect1_edt_patnm_onkeydown" autoselect="true"/>
  57. <Button id="btn_hngnm" taborder="47" class="icon_search" position="absolute 971 8 991 28" onclick="roundrect1_btn_hngnm_onclick"/>
  58. <Static id="Static00" text="/" position="absolute 860 10 873 26"/>
  59. </Layout>
  60. </Layouts>
  61. </Div>
  62. <Grid id="grd_diet" taborder="10" binddataset="ds_grid_grd_diet" useinputpanel="false" cellsizingtype="col" position="absolute 352 125 1157 805" anchor="all">
  63. <Formats>
  64. <Format id="default">
  65. <Columns>
  66. <Column size="25"/>
  67. <Column size="67"/>
  68. <Column size="40"/>
  69. <Column size="70"/>
  70. <Column size="74"/>
  71. <Column size="79"/>
  72. <Column size="80"/>
  73. <Column size="40"/>
  74. <Column size="151"/>
  75. <Column size="126"/>
  76. <Column size="100"/>
  77. <Column size="68"/>
  78. <Column size="72"/>
  79. <Column size="73"/>
  80. <Column size="52"/>
  81. <Column size="66"/>
  82. <Column size="0"/>
  83. <Column size="0"/>
  84. </Columns>
  85. <Rows>
  86. <Row size="22" band="head"/>
  87. <Row size="22"/>
  88. </Rows>
  89. <Band id="head">
  90. <Cell/>
  91. <Cell col="1" text="병동"/>
  92. <Cell col="2" text="병실"/>
  93. <Cell col="3" text="등록번호"/>
  94. <Cell col="4" text="환자명"/>
  95. <Cell col="5" text="보호자식여부"/>
  96. <Cell col="6" text="식사일자"/>
  97. <Cell col="7" text="끼니"/>
  98. <Cell col="8" text="식사명"/>
  99. <Cell col="9" text="특이사항"/>
  100. <Cell col="10" text="remark"/>
  101. <Cell col="11" text="입원일자"/>
  102. <Cell col="12" text="최종변경일자"/>
  103. <Cell col="13" text="최종수정자"/>
  104. <Cell col="14" text="담당교수"/>
  105. <Cell col="15" text="진료과"/>
  106. <Cell col="16" text="prcphistcd"/>
  107. <Cell col="17" text="remark"/>
  108. </Band>
  109. <Band id="body">
  110. <Cell celltype="head" text="expr:currow+1"/>
  111. <Cell col="1" displaytype="combo" text="bind:ward" combodataset="ds_init_cmb_ward" combocodecol="deptcd" combodatacol="depthngnm"/>
  112. <Cell col="2" style="align:left middle;padding:0 0 0 3;" text="bind:room"/>
  113. <Cell col="3" text="bind:pid"/>
  114. <Cell col="4" text="bind:hngnm"/>
  115. <Cell col="5" style="align:left middle;padding:0 0 0 3;" text="bind:procermealyn"/>
  116. <Cell col="6" displaytype="date" edittype="date" style="align:left middle;padding:0 0 0 3;" text="bind:mealdd" mask="yyyy-MM-dd" calendardisplaynulltype="none"/>
  117. <Cell col="7" displaytype="combo" edittype="none" style="align:left middle;padding:0 0 0 3;" text="bind:dietmeal" combodataset="ds_radio1" combocodecol="cdid" combodatacol="cdnm"/>
  118. <Cell col="8" style="align:left middle;padding:0 0 0 3;" text="bind:dietcd"/>
  119. <Cell col="9" style="align:left middle;padding:0 0 0 3;" text="bind:prcpdelivefact"/>
  120. <Cell col="10" style="align:left middle;padding:0 0 0 3;" text="bind:remark"/>
  121. <Cell col="11" displaytype="date" style="align:left middle;padding:0 0 0 3;" text="bind:orddd" calendardisplaynulltype="none"/>
  122. <Cell col="12" displaytype="date" style="align:left middle;padding:0 0 0 3;" text="bind:lastupdtdd" calendardisplaynulltype="none"/>
  123. <Cell col="13" style="align:left middle;padding:0 0 0 3;" text="bind:lastupdtnm"/>
  124. <Cell col="14" style="align:left middle;padding:0 0 0 3;" text="bind:atdoct"/>
  125. <Cell col="15" style="align:left middle;padding:0 0 0 3;" text="bind:orddept"/>
  126. <Cell col="16" text="bind:prcphistcd"/>
  127. <Cell col="17" text="bind:remark"/>
  128. </Band>
  129. </Format>
  130. </Formats>
  131. </Grid>
  132. <Grid id="grd_patlist" taborder="11" binddataset="ds_grid_grd_patlist" useinputpanel="false" cellsizingtype="col" autosizingtype="none" oncellclick="grd_patlist_oncellclick" position="absolute 0 125 345 805" anchor="left top bottom" style="align:center middle;" onclick="grd_patlist_onclick">
  133. <Formats>
  134. <Format id="default">
  135. <Columns>
  136. <Column size="25" band="left"/>
  137. <Column size="42"/>
  138. <Column size="75"/>
  139. <Column size="75"/>
  140. <Column size="100"/>
  141. <Column size="156"/>
  142. <Column size="68"/>
  143. <Column size="71"/>
  144. <Column size="68"/>
  145. <Column size="52"/>
  146. </Columns>
  147. <Rows>
  148. <Row size="22" band="head"/>
  149. <Row size="22"/>
  150. </Rows>
  151. <Band id="head">
  152. <Cell/>
  153. <Cell col="1" text="병실"/>
  154. <Cell col="2" text="환자명"/>
  155. <Cell col="3" text="등록번호"/>
  156. <Cell col="4" text="진료과"/>
  157. <Cell col="5" text="진단명"/>
  158. <Cell col="6" text="입원일"/>
  159. <Cell col="7" text="퇴원일"/>
  160. <Cell col="8" text="병동"/>
  161. <Cell col="9" text="재원상태"/>
  162. </Band>
  163. <Band id="body">
  164. <Cell celltype="head" expr="expr:currow+1"/>
  165. <Cell col="1" text="bind:room" autosizecol="limitmin"/>
  166. <Cell col="2" style="align:left middle;" text="bind:hngnm" autosizecol="limitmin"/>
  167. <Cell col="3" displaytype="text" style="align:center;" text="bind:pid" autosizecol="limitmin"/>
  168. <Cell col="4" displaytype="combo" edittype="none" text="bind:orddeptcd" combodataset="ds_init_cmb_orddept" combocodecol="deptcd" combodatacol="depthngnm" autosizecol="limitmin"/>
  169. <Cell col="5" text="bind:diagnm"/>
  170. <Cell col="6" text="bind:indd"/>
  171. <Cell col="7" text="bind:dschdd"/>
  172. <Cell col="8" displaytype="combo" edittype="none" text="bind:ward" combodataset="ds_init_cmb_ward" combocodecol="deptcd" combodatacol="depthngnm" autosizecol="limitmin"/>
  173. <Cell col="9" displaytype="normal" text="bind:indschacptstat" combodataset="ds_init_patflag" combocodecol="cdid" combodatacol="cdnm" autosizecol="limitmin"/>
  174. <Cell col="10"/>
  175. </Band>
  176. </Format>
  177. <Format id="format_copy"/>
  178. </Formats>
  179. </Grid>
  180. <Shape id="line1" class="line_1" position="absolute 0 120 346 126" style="strokepen:3 solid #33bbbbff;"/>
  181. <Shape id="line00" class="line_1" position="absolute 351 120 1157 126" style="strokepen:3 solid #33bbbbff;"/>
  182. </Layout>
  183. </Layouts>
  184. <Objects>
  185. <Dataset id="ds_grid_grd_patlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  186. <ColumnInfo>
  187. <Column id="orddeptcd" type="STRING"/>
  188. <Column id="ward" type="STRING"/>
  189. <Column id="room" type="STRING"/>
  190. <Column id="pid" type="STRING"/>
  191. <Column id="hngnm" type="STRING"/>
  192. <Column id="prcpdd" type="STRING"/>
  193. <Column id="execprcpuniqno" type="STRING"/>
  194. <Column id="indd" type="STRING"/>
  195. <Column id="dschdd" type="STRING"/>
  196. <Column id="ward" type="STRING"/>
  197. <Column id="patflag" type="STRING"/>
  198. <Column id="h_indschacptstat" type="STRING"/>
  199. <Column id="indschacptstat" type="STRING" size="256"/>
  200. <Column id="diagnm" type="STRING" size="256"/>
  201. </ColumnInfo>
  202. </Dataset>
  203. <Dataset id="ds_grid_grd_diet" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  204. <ColumnInfo>
  205. <Column id="check" type="STRING" size="256"/>
  206. <Column id="ward" type="STRING" size="256"/>
  207. <Column id="room" type="STRING" size="256"/>
  208. <Column id="pid" type="STRING" size="256"/>
  209. <Column id="hngnm" type="STRING" size="256"/>
  210. <Column id="procermealyn" type="STRING" size="256"/>
  211. <Column id="mealdd" type="STRING" size="256"/>
  212. <Column id="dietmeal" type="STRING" size="256"/>
  213. <Column id="dietcd" type="STRING" size="256"/>
  214. <Column id="prcpdelivefact" type="STRING" size="256"/>
  215. <Column id="clinccmtcnts" type="STRING" size="256"/>
  216. <Column id="tfdtlcd" type="STRING" size="256"/>
  217. <Column id="remark" type="STRING" size="256"/>
  218. <Column id="orddd" type="STRING" size="256"/>
  219. <Column id="lastupdtdd" type="STRING" size="256"/>
  220. <Column id="lastupdtnm" type="STRING" size="256"/>
  221. <Column id="atdoct" type="STRING" size="256"/>
  222. <Column id="orddept" type="STRING" size="256"/>
  223. </ColumnInfo>
  224. <Rows>
  225. <Row>
  226. <Col id="check"/>
  227. <Col id="ward"/>
  228. <Col id="room"/>
  229. <Col id="pid"/>
  230. <Col id="hngnm"/>
  231. <Col id="procermealyn"/>
  232. <Col id="mealdd"/>
  233. <Col id="dietmeal"/>
  234. <Col id="dietcd"/>
  235. <Col id="prcpdelivefact"/>
  236. <Col id="clinccmtcnts"/>
  237. <Col id="tfdtlcd"/>
  238. <Col id="remark"/>
  239. <Col id="orddd"/>
  240. <Col id="lastupdtdd"/>
  241. <Col id="lastupdtnm"/>
  242. <Col id="atdoct"/>
  243. <Col id="orddept"/>
  244. </Row>
  245. </Rows>
  246. </Dataset>
  247. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  248. <Dataset id="ds_init_cmb_ward" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  249. <ColumnInfo>
  250. <Column id="deptcd" type="STRING" size="256"/>
  251. <Column id="depthngnm" type="STRING" size="256"/>
  252. </ColumnInfo>
  253. </Dataset>
  254. <Dataset id="ds_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  255. <Dataset id="ds_init_cmb_diet" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  256. <ColumnInfo>
  257. <Column id="cdid" type="STRING" size="256"/>
  258. <Column id="cdnm" type="STRING" size="256"/>
  259. </ColumnInfo>
  260. </Dataset>
  261. <Dataset id="ds_init_cmb_orddept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  262. <ColumnInfo>
  263. <Column id="deptcd" type="STRING" size="256"/>
  264. <Column id="depthngnm" type="STRING" size="256"/>
  265. </ColumnInfo>
  266. </Dataset>
  267. <Dataset id="ds_init_cmb_room" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  268. <ColumnInfo>
  269. <Column id="wardroomcdid" type="STRING" size="256"/>
  270. <Column id="wardroomcdnm" type="STRING" size="256"/>
  271. </ColumnInfo>
  272. </Dataset>
  273. <Dataset id="ds_radio1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  274. <ColumnInfo>
  275. <Column id="cdid" type="STRING" size="256"/>
  276. <Column id="cdnm" type="STRING" size="256"/>
  277. </ColumnInfo>
  278. </Dataset>
  279. <Dataset id="ds_init_patflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  280. <ColumnInfo>
  281. <Column id="cdid" type="STRING" size="256"/>
  282. <Column id="cdnm" type="STRING" size="256"/>
  283. </ColumnInfo>
  284. <Rows>
  285. <Row>
  286. <Col id="cdid">A</Col>
  287. <Col id="cdnm">재원</Col>
  288. </Row>
  289. <Row>
  290. <Col id="cdid">D</Col>
  291. <Col id="cdnm">퇴원</Col>
  292. </Row>
  293. </Rows>
  294. </Dataset>
  295. <Dataset id="ds_main_receivedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  296. </Objects>
  297. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  298. * System Name :
  299. * Job Name :
  300. * File Name : SMANT01000_환자별식사력조회.xfdl
  301. * Creator :
  302. * Make Date : 2014-05-13
  303. *
  304. * Description :
  305. *---------------------------------------------------------------------------------------
  306. * Modify Date Modifier Modify Description
  307. *---------------------------------------------------------------------------------------
  308. *
  309. *---------------------------------------------------------------------------------------
  310. ****************************************************************************************/
  311. //=======================================================================================
  312. // xjs Include
  313. //---------------------------------------------------------------------------------------
  314. include "com_commonxp::comm_main.xjs";
  315. include "ast_commonxp::AST.xjs";
  316. //=======================================================================================
  317. // Function
  318. //---------------------------------------------------------------------------------------
  319. function lf_initDataSet(){
  320. // cmb_ward의 INIT Dataset
  321. this.cmb_ward.innerdataset = "ds_init_cmb_ward";
  322. this.cmb_ward.codecolumn = "deptcd";
  323. this.cmb_ward.datacolumn = "depthngnm";
  324. // cmb_diet의 INIT Dataset
  325. this.cmb_diet.innerdataset = "ds_init_cmb_diet";
  326. this.cmb_diet.codecolumn = "cdid";
  327. this.cmb_diet.datacolumn = "cdnm";
  328. // cmb_room의 INIT Dataset
  329. this.cmb_room.innerdataset = "ds_init_cmb_room";
  330. this.cmb_room.codecolumn = "cdid";
  331. this.cmb_room.datacolumn = "cdnm";
  332. // cmb_orddept의 INIT Dataset
  333. this.cmb_orddept.innerdataset = "ds_init_cmb_orddept";
  334. this.cmb_orddept.codecolumn = "deptcd";
  335. this.cmb_orddept.datacolumn = "depthngnm";
  336. }
  337. // 병실 조회
  338. function submit_TRANT01004() {
  339. dsf_createDsRow("ds_send",
  340. [{col:"wardcd", val:roundrect1.cmb_ward.value}
  341. ,{col:"initflag", val:"2"}
  342. ]);
  343. var objParam = new Object();
  344. objParam.id = "TRANT01004";
  345. objParam.service = "dietsumapp.DietSum";
  346. objParam.method = "reqGetRoom";
  347. objParam.inds = "req=ds_send";
  348. objParam.outds ="ds_init_cmb_room=ret";
  349. objParam.callback = "cbf_TRANT01004";
  350. tranf_submit(objParam);
  351. }
  352. function cbf_TRANT01004(sSvcId, objErrorCode, objErrorMsg){
  353. roundrect1.cmb_room.index = 0;
  354. }
  355. // 환자선택 조회
  356. function submit_TRANT01001() {
  357. dsf_createDsRow("ds_send",
  358. [{col:"fromdd", val:roundrect1.ipt_fromdd.value}
  359. ,{col:"todd", val:roundrect1.ipt_todd.value}
  360. ,{col:"patflag", val:roundrect1.rdo_patflag.value}
  361. ,{col:"pid", val:utlf_transNullToEmpty(roundrect1.edt_pid.value)}
  362. ,{col:"hngnm", val:utlf_transNullToEmpty(roundrect1.edt_patnm.value)}
  363. ,{col:"orddept", val:roundrect1.cmb_orddept.value}
  364. ,{col:"ward", val:roundrect1.cmb_ward.value}
  365. ,{col:"room", val:roundrect1.cmb_room.value}
  366. ,{col:"diet", val:roundrect1.cmb_diet.value}
  367. ]);
  368. var objParam = new Object();
  369. objParam.id = "TRANT01001";
  370. objParam.service = "dietsumapp.DietSum";
  371. objParam.method = "reqGetDietPrcpPat";
  372. objParam.inds = "req=ds_send";
  373. objParam.outds ="ds_grid_grd_patlist=ret";
  374. objParam.callback = "cbf_TRANT01001";
  375. tranf_submit(objParam);
  376. }
  377. function cbf_TRANT01001(strSvcID, nErrorCode, strErrorMsg){
  378. //에러 처리
  379. if(nErrorCode == 0){
  380. ds_grid_grd_patlist.addColumn("patflag", "string"); //추가 삭제시 필요한 컬럼 추가
  381. ds_grid_grd_patlist.applyChange(); //상태값 normal로
  382. ds_grid_grd_patlist.rowposition = -1; //조회시 선택된 row 없도록
  383. }else{
  384. }
  385. }
  386. function finit() {
  387. // 화면open시 공통코드 setting
  388. appf_getCodeListSubmit([{cdGrpId: "A0047", dsNm: "ds_init_cmb_diet", sortField: "cdid", sortMethod: "desc"}]
  389. , false // 최소 컬럼 조회여부
  390. , false // 비동기 여부
  391. , "");
  392. appf_getCodeListSubmit([{cdGrpId: "M0042", dsNm: "ds_radio1", sortField: "cdnm", sortMethod: "desc"}]
  393. , false
  394. , true
  395. , "");
  396. appf_getCodeListSubmit([{cdGrpId: "A0355", dsNm: "ds_grid_grd_data", sortField: "", sortMethod: ""}]
  397. , false
  398. , true
  399. , "");
  400. //병동콤보
  401. appf_getWardDeptList(sysf_getUserInfo("dutplceinstcd"), "depthngnm", "asc", utlf_getCurrentDate(), "after", "ds_init_cmb_ward", "", "");
  402. frmf_addComboItem("roundrect1.cmb_ward", "- 전 체 -", "", ""); //상태
  403. roundrect1.cmb_ward.index = 0;
  404. //2.진료과 세팅
  405. var instcd = sysf_getUserInfo("dutplceinstcd");
  406. appf_getDeptCodeList(instcd, "orduseyn", "D", "", "", "", "", "", "ds_init_cmb_orddept", false);
  407. frmf_addComboItem("roundrect1.cmb_orddept", "- 전 체 -", "", "");
  408. roundrect1.cmb_orddept.index = 0;
  409. frmf_addComboItem("roundrect1.cmb_diet", "- 전 체-", "", "");
  410. roundrect1.cmb_diet.index = 0;
  411. }
  412. // 식사력 조회
  413. function fGetPatientDietList1()
  414. {
  415. if (grd_patlist.rowcount > 0)
  416. {
  417. var pid = ds_grid_grd_patlist.getColumn(ds_grid_grd_patlist.rowposition, "pid");
  418. var prcpdd =ds_grid_grd_patlist.getColumn(ds_grid_grd_patlist.rowposition, "prcpdd") ;
  419. var indd = ds_grid_grd_patlist.getColumn(ds_grid_grd_patlist.rowposition, "indd");
  420. var orddeptcd = ds_grid_grd_patlist.getColumn(ds_grid_grd_patlist.rowposition, "orddeptcd");
  421. var pid = ds_grid_grd_patlist.getColumn(ds_grid_grd_patlist.rowposition, "pid");
  422. dsf_createDsRow("ds_send",
  423. [{col:"fromdd", val:roundrect1.ipt_fromdd.value}
  424. ,{col:"todd", val:roundrect1.ipt_todd.value}
  425. ,{col:"ordflag", val:"DIET"}
  426. ,{col:"pid", val:pid}
  427. ,{col:"prcpdd", val:prcpdd}
  428. ,{col:"indd", val:indd}
  429. ,{col:"orddeptcd", val:orddeptcd}
  430. ,{col:"pid", val:pid}
  431. ]);
  432. var objParam = new Object();
  433. objParam.id = "TRANT01002";
  434. objParam.service = "dietsumapp.DietSum";
  435. objParam.method = "reqGetPatDietHist";
  436. objParam.inds = "req=ds_send";
  437. objParam.outds ="ds_grid_grd_diet=ret";
  438. objParam.callback = "cbf_TRANT01002";
  439. tranf_submit(objParam);
  440. }
  441. }
  442. function cbf_TRANT01002(strSvcID, nErrorCode, strErrorMsg){
  443. //에러 처리
  444. if(nErrorCode == 0){
  445. ds_grid_grd_diet.rowposition = -1; //조회시 선택된 row 없도록
  446. }else{
  447. }
  448. }
  449. function lf_callBack_SearchPatInfo(){
  450. roundrect1.btn_search.click();
  451. }
  452. //=======================================================================================
  453. // Event
  454. //---------------------------------------------------------------------------------------
  455. /****************************************************************************************
  456. * Components :
  457. * Components ID : SMANT01000
  458. * Event : onload
  459. * Argument : 01.obj : Object Event has occurred
  460. * : 02.e : Event Object
  461. * Description :
  462. ****************************************************************************************/
  463. function SMANT01000_onload(obj:Form, e:LoadEventInfo)
  464. {
  465. frmf_initForm(obj); // 화면공통
  466. try{
  467. ds_main_receivedata.copyData(arg_ds_main_receivedata);
  468. }catch(e){
  469. sysf_catchTrace(e);
  470. }
  471. // //팝업으로 쓰일 때 값 세팅 - 20140703 홍다빈
  472. // if( frmf_getOpenerUID() == "top" ){ //상단에서 열 경우
  473. // var sdate = utlf_getCurrentDate();
  474. // roundrect1.ipt_fromdd.value = sdate;
  475. // roundrect1.ipt_todd.value = sdate;
  476. //
  477. // }else{
  478. // if( frmf_checkOpener() )
  479. // {
  480. // var a, b, c;
  481. // try{ a = pid; } catch(e){};
  482. // try{ b = fromdd; } catch(e){};
  483. // try{ c = todd; } catch(e){};
  484. //
  485. // roundrect1.edt_pid.value = a;
  486. // roundrect1.ipt_fromdd.value = b;
  487. // roundrect1.ipt_todd.value = c;
  488. //
  489. // var ev = new ClickEventInfo;
  490. // frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  491. // }
  492. // }
  493. // finit();
  494. //
  495. // roundrect1.btn_search.enable = frmf_checkAuth("R");
  496. // btn_excel1.enable = frmf_checkAuth("P");
  497. // btn_excel2.enable = frmf_checkAuth("P");
  498. //
  499. // //간호사가 로그인했을 경우 로그인한 간호사의 소속병동으로 셋팅후 자동조회
  500. // var dutplcecd = sysf_getUserInfo("dutplcecd") ; //소속부서코드
  501. //
  502. // if ( !frmf_checkOpener() ) {
  503. // roundrect1.edt_pid.value = opener.getOwnerFrame.sArg02; //pid
  504. // roundrect1.ipt_fromdd.value = opener.getOwnerFrame.sArg03; //fromdd
  505. // roundrect1.ipt_todd.value = opener.getOwnerFrame.sArg04; //todd
  506. // }
  507. //
  508. //
  509. // if ( dutplcecd.substr(0,3) != "325") {
  510. // if( dutplcecd.substr(0,4) != "1000" && dutplcecd.substr(0,4) != "4070") {
  511. // //alert("간호에서 들어온것으로 판단");
  512. // ds_send.setColumn(0, "ward", dutplcecd);
  513. // var ev = new ClickEventInfo;
  514. // frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  515. // }else{
  516. // //전달받은 파라미터 그대로 조회 실행
  517. // var ev = new ClickEventInfo;
  518. // frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  519. // }
  520. //
  521. // }
  522. this.setTimer(0, 100);
  523. }
  524. /****************************************************************************************
  525. * Components :
  526. * Components ID : btn_search
  527. * Event : onclick
  528. * Argument : 01.obj : Object Event has occurred
  529. * : 02.e : Event Object
  530. * Description :
  531. ****************************************************************************************/
  532. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  533. {
  534. var fromdd = roundrect1.ipt_fromdd.value;
  535. var todd = roundrect1.ipt_todd.value;
  536. if (fromdd > todd) {
  537. sysf_messageBox("처방 시작일은 종료일보다 클 수", "I004");
  538. return;
  539. } else {
  540. //model.resetInstanceNode("/root/main/diethist/data"); //오른쪽 식사력 그리드 초기화
  541. //submit("TRANT01001");
  542. ds_grid_grd_diet.clearData();
  543. submit_TRANT01001();
  544. //조회 후 재원상태 표시
  545. for ( i=1; i<grd_patlist.rowcount; i++) {
  546. var indd = ds_grid_grd_patlist.getColumn(i, "indd");
  547. var indschacptstat = ds_grid_grd_patlist.getColumn(i, "indschacptstat");
  548. if ( indschacptstat == "D" ) {
  549. ds_grid_grd_patlist.setColumn(i, "patflag", "퇴원");
  550. } else if ( (indschacptstat == "A") && (indd == utlf_getCurrentDate()) ) {
  551. ds_grid_grd_patlist.setColumn(i, "patflag", "신환");
  552. } else if ( (indschacptstat == "A") && (indd < utlf_getCurrentDate()) ) {
  553. ds_grid_grd_patlist.setColumn(i, "patflag","재원");
  554. }
  555. }
  556. }
  557. }
  558. /****************************************************************************************
  559. * Components :
  560. * Components ID : grd_patlist
  561. * Event : oncellclick
  562. * Argument : 01.obj : Object Event has occurred
  563. * : 02.e : Event Object
  564. * Description :
  565. ****************************************************************************************/
  566. function grd_patlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  567. {
  568. fGetPatientDietList1();
  569. }
  570. /****************************************************************************************
  571. * Components :
  572. * Components ID : btn_excel1
  573. * Event : onclick
  574. * Argument : 01.obj : Object Event has occurred
  575. * : 02.e : Event Object
  576. * Description :
  577. ****************************************************************************************/
  578. function btn_excel1_onclick(obj:Button, e:ClickEventInfo)
  579. {
  580. grdf_exportExcel(grd_patlist, "환자명단_환자별식사력", "grd_patlist"); //파일 다이얼로그로 저장위치 저장
  581. }
  582. /****************************************************************************************
  583. * Components :
  584. * Components ID : btn_excel2
  585. * Event : onclick
  586. * Argument : 01.obj : Object Event has occurred
  587. * : 02.e : Event Object
  588. * Description :
  589. ****************************************************************************************/
  590. function btn_excel2_onclick(obj:Button, e:ClickEventInfo)
  591. {
  592. grdf_exportExcel(grd_diet, "환자별식사력리스트", "grd_diethist"); //파일 다이얼로그로 저장위치 저장
  593. }
  594. function roundrect1_cmb_ward_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  595. {
  596. submit_TRANT01004();
  597. }
  598. function roundrect1_edt_pid_onkeydown(obj:Edit, e:KeyEventInfo)
  599. {
  600. if(e.keycode == 13)
  601. {
  602. var ev = new ClickEventInfo;
  603. frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  604. }
  605. }
  606. function roundrect1_btn_hngnm_onclick(obj:Button, e:ClickEventInfo)
  607. {
  608. frmf_modal("SPPMC02500", "SPPMC02500", null, null, null, 200, 200, null, null, null, null, null, "M");
  609. if(!utlf_isNull(this.objects["ds_patinfolist"])) {
  610. var sPid = ds_patinfolist.getColumn(0, "pid");
  611. var sHngnm = ds_patinfolist.getColumn(0, "hngnm");
  612. roundrect1.edt_pid.value = sPid;
  613. roundrect1.edt_patnm.value = sHngnm;
  614. }
  615. }
  616. function roundrect1_edt_patnm_onkeydown(obj:Edit, e:KeyEventInfo)
  617. {
  618. if(e.keycode == 13)
  619. {
  620. var ev = new ClickEventInfo;
  621. frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  622. }
  623. }
  624. function SMANT01000_ontimer(obj:Form, e:TimerEventInfo)
  625. {
  626. if( e.timerid == 0 ){
  627. this.killTimer(0);
  628. //팝업으로 쓰일 때 값 세팅 - 20140703 홍다빈
  629. if( frmf_getOpenerUID() == "top" ){ //상단에서 열 경우
  630. var sdate = utlf_getCurrentDate();
  631. roundrect1.ipt_fromdd.value = sdate;
  632. roundrect1.ipt_todd.value = sdate;
  633. }else{
  634. if( frmf_checkOpener() )
  635. {
  636. var a, b, c, d, e, f, g;
  637. try{ a = pid; } catch(e){};
  638. try{ b = fromdd; } catch(e){};
  639. try{ c = todd; } catch(e){};
  640. try{ d = hngnm; } catch(e){};
  641. try{ e = ward; } catch(e){};
  642. try{ f = room; } catch(e){};
  643. try{ g = patflag; } catch(e){};
  644. roundrect1.edt_pid.value = a;
  645. roundrect1.ipt_fromdd.value = b;
  646. roundrect1.ipt_todd.value = c;
  647. roundrect1.edt_patnm.value = d;
  648. roundrect1.cmb_ward.value = e;
  649. roundrect1.cmb_room.value = f;
  650. roundrect1.rdo_patflag.value = "0";//g;
  651. var ev = new ClickEventInfo;
  652. frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  653. }
  654. }
  655. finit();
  656. roundrect1.btn_search.enable = frmf_checkAuth("R");
  657. btn_excel1.enable = frmf_checkAuth("P");
  658. btn_excel2.enable = frmf_checkAuth("P");
  659. //간호사가 로그인했을 경우 로그인한 간호사의 소속병동으로 셋팅후 자동조회
  660. var dutplcecd = sysf_getUserInfo("dutplcecd") ; //소속부서코드
  661. if( frmf_getOpenerUID() != "top" ){ //상단에서 열 경우
  662. if ( frmf_checkOpener() ) {
  663. roundrect1.edt_pid.value = ds_main_receivedata.getColumn(0, "pid"); //pid
  664. roundrect1.ipt_fromdd.value = ds_main_receivedata.getColumn(0, "prcpdd"); //fromdd
  665. roundrect1.ipt_todd.value = ds_main_receivedata.getColumn(0, "prcpdd"); //todd
  666. }
  667. }
  668. if ( dutplcecd.substr(0,3) != "325") {
  669. if( dutplcecd.substr(0,4) != "1000" && dutplcecd.substr(0,4) != "4070") {
  670. //alert("간호에서 들어온것으로 판단");
  671. ds_send.setColumn(0, "ward", dutplcecd);
  672. var ev = new ClickEventInfo;
  673. frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  674. }else{
  675. //전달받은 파라미터 그대로 조회 실행
  676. var ev = new ClickEventInfo;
  677. frmf_inputEnterKey("roundrect1.btn_search", "onclick", ev );
  678. }
  679. }
  680. //식사처방출력 화면에서 호출된 경우 자동 조회
  681. if (!utlf_isNull(ds_main_receivedata.getColumn(0, "flag"))) {
  682. ds_send.setColumn(0, "pid", ds_main_receivedata.getColumn(0, "pid"));
  683. ds_send.setColumn(0, "fromdd", ds_main_receivedata.getColumn(0, "prcpdd"));
  684. ds_send.setColumn(0, "todd", ds_main_receivedata.getColumn(0, "prcpdd"));
  685. btn_search_onclick();
  686. ds_send.setColumn(0, "pid", "");
  687. }
  688. }
  689. }
  690. function roundrect1_cmb_room_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  691. {
  692. roundrect1.btn_search.click();
  693. }
  694. ]]></Script>
  695. </Form>
  696. </FDL>