SMLLR91100_현장검사결과등록.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLR90300_현장검사결과등록.xrw
  4. * 설 명 : 현장검사결과등록
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 송요셉
  7. * 작 성 일 : 2007.06.19
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  13. <xhtml:head>
  14. <xhtml:title>현장검사결과등록</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <getPoctlist>
  20. <getTestInfoCnts>
  21. <bcgbn/>
  22. <bcbtn/>
  23. <choi/>
  24. <bcno2/>
  25. <bcno/>
  26. <prcpdd/>
  27. <tclsnm/>
  28. <reptrslt/>
  29. <rsltunit/>
  30. <ref/>
  31. <prcpgenrflagnm/>
  32. <execdeptcd/>
  33. <tclscd/>
  34. <testlrgkind/>
  35. <spccd/>
  36. <diffcntyn/>
  37. <tclskind/>
  38. <prcpgenrflag/>
  39. <rcptyn/>
  40. <execdd/>
  41. </getTestInfoCnts>
  42. <patnm>
  43. <pname/>
  44. </patnm>
  45. </getPoctlist>
  46. <getUsernm>
  47. <usernm/>
  48. </getUsernm>
  49. <poctlist>
  50. <bcgbn/>
  51. <bcbtn/>
  52. <choi/>
  53. <bcno2/>
  54. <bcno/>
  55. <tclsnm/>
  56. <reptrslt/>
  57. <ref/>
  58. <refval/>
  59. <reptdd/>
  60. <reptnm/>
  61. <testcd/>
  62. <spccd/>
  63. <rsltseq/>
  64. <testlrgkind/>
  65. </poctlist>
  66. <getJaeWonTrue>
  67. <jaewonyn/>
  68. </getJaeWonTrue>
  69. </main>
  70. <send>
  71. <pid/>
  72. <prcpgenrflag/>
  73. <sdd/>
  74. <edd/>
  75. <userid/>
  76. <data1/>
  77. <data2/>
  78. <codeflag/>
  79. </send>
  80. <init>
  81. </init>
  82. <hidden>
  83. <ref>
  84. <pid/>
  85. <usernm/>
  86. <userid/>
  87. <sdd/>
  88. <edd/>
  89. <pidstr/>
  90. <prcpgenrflag/>
  91. <bcno/>
  92. </ref>
  93. <popupmenu>
  94. <grid>
  95. <item>
  96. </item>
  97. </grid>
  98. </popupmenu>
  99. <newElement/>
  100. </hidden>
  101. </root>
  102. </instance>
  103. <script type="javascript" ev:event="xforms-model-construct-done">
  104. <![CDATA[
  105. fOpenList();
  106. ]]>
  107. </script>
  108. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  109. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  110. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  111. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  112. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  113. <submission id="TXLLR91101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  114. <submission id="TRLLR91102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/poctlist"/>
  115. <submission id="TRLLR91101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getPoctlist"/>
  116. <submission id="TRLLR91103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getJaeWonTrue"/>
  117. <submission id="TXLLR91102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  118. <submission id="TRLZZ00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getUsernm"/>
  119. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  120. </model>
  121. <script type="javascript">
  122. <![CDATA[
  123. function fExeCancel() {
  124. window.close();
  125. }
  126. function fOpenList(){
  127. //model.removeNodeset("/root/main/getTestInfoCnts");
  128. var toDay = getCurrentDate();
  129. model.setValue("/root/hidden/ref/sdd", toDay);
  130. model.setValue("/root/hidden/ref/edd", toDay);
  131. model.setValue("/root/hidden/ref/userid", getUserId());
  132. //model.setValue("/root/main/getUsernm/usernm", getUserName());
  133. model.setValue("/root/hidden/ref/pid", getPatientInfo("pid"));
  134. //model.setValue("/root/hidden/ref/patnm", getPatientInfo("pname"));
  135. model.setValue("/root/send/pid", model.getValue("/root/hidden/ref/pid"));
  136. //입원 환자 여부 조회
  137. submit("TRLLR91103");
  138. var jaewonyn = model.getValue("/root/main/getJaeWonTrue/jaewonyn");
  139. if(jaewonyn == "Y"){
  140. model.setValue("/root/hidden/ref/prcpgenrflag", "2");
  141. }else{
  142. model.setValue("/root/hidden/ref/prcpgenrflag", "1");
  143. }
  144. model.setValue("/root/send/prcpgenrflag", model.getValue("/root/hidden/ref/prcpgenrflag"));
  145. model.setValue("/root/hidden/ref/pidstr", model.getValue("/root/hidden/ref/pid"));
  146. fBaseInfoRef("0109|");
  147. submit("TRLLR91101");
  148. fRemark(1);
  149. freprint();
  150. iptSearch.selBegin = 0;
  151. iptSearch.selEnd = iptSearch.currentText.length;
  152. model.setFocus("iptSearch");
  153. }
  154. function fRemark(flag){
  155. var sunab = false;
  156. var sunabcnts = "";
  157. if(flag == 1){
  158. grd_TestInfoCnts.rebuildStyle();
  159. for(iRow=1; iRow < grd_TestInfoCnts.rows; iRow ++ ){
  160. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn") == "true"){
  161. grd_TestInfoCnts.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC1.gif";
  162. grd_TestInfoCnts.cellstyle("background-position", iRow, 1) = "center"
  163. }
  164. else if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn").getTrim().toString() == "false"){
  165. grd_TestInfoCnts.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC2.gif";
  166. grd_TestInfoCnts.cellstyle("background-position", iRow, 1) = "center"
  167. }
  168. else if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn").getTrim().toString() == "-"){
  169. grd_TestInfoCnts.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC0.gif";
  170. grd_TestInfoCnts.cellstyle("background-position", iRow, 1) = "center"
  171. }
  172. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/tclscd") ==
  173. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/testcd")){
  174. if((model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/prcpgenrflag") == "O" &&
  175. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/rcptstatcd") != "230") ||
  176. (model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/prcpgenrflag") == "D" &&
  177. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/rcptstatcd") != "230") ||
  178. (model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/prcpgenrflag") == "S" &&
  179. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/rcptstatcd") != "230")){
  180. /* 이재오 VIP 수정 2013 2월 15일 */
  181. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/rcptyn") == "V" )
  182. {
  183. sunab = false;
  184. //sunab = true;
  185. }
  186. else
  187. {
  188. sunab = true;
  189. }
  190. sunabcnts = sunabcnts +" "+model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/tclsnm") + ",";
  191. }
  192. }
  193. }
  194. if(sunab){
  195. sunabcnts = sunabcnts.substring(0, sunabcnts.length -1);
  196. alert(sunabcnts + " 항목은 수납되지 않았습니다. ");
  197. }
  198. }
  199. else{
  200. poctgrid.rebuildStyle();
  201. for(iRow=1;iRow < poctgrid.rows; iRow ++ ){
  202. if(model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn").toString() == "true"){
  203. poctgrid.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC1.gif";
  204. poctgrid.cellstyle("background-position", iRow, 1) = "center"
  205. }
  206. else if(model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn").toString() == "false"){
  207. poctgrid.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC2.gif";
  208. poctgrid.cellstyle("background-position", iRow, 1) = "center"
  209. }
  210. else if(model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn").toString() == "-"){
  211. poctgrid.cellstyle("background-image", iRow, 1) = "../../../lis/commonweb/images/chkBC0.gif";
  212. poctgrid.cellstyle("background-position", iRow, 1) = "center"
  213. }
  214. }
  215. //grd_TestInfoCnts.rebuildStyle();
  216. }
  217. }
  218. function fSetGridChoi(flag){
  219. if(flag == 1){
  220. var row = grd_TestInfoCnts.row;
  221. var col = grd_TestInfoCnts.col;
  222. if(grd_TestInfoCnts.isCell(event.target) && grd_TestInfoCnts.row >= grd_TestInfoCnts.fixedRows){
  223. if(col == 1){
  224. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/bcgbn") == "true"){
  225. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/bcgbn","false");
  226. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/choi" , "false");
  227. grd_TestInfoCnts.cellstyle("background-image", row, 1) = "../../../lis/commonweb/images/chkBC0.gif";
  228. grd_TestInfoCnts.cellstyle("background-position", row, 1) = "center"
  229. if(row + 1 <= grd_TestInfoCnts.rows- 1){
  230. for(iRow = row + 1 ; ; iRow ++ ){
  231. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn") == "true" ||
  232. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn") == "false" ||
  233. iRow > grd_TestInfoCnts.rows- 1){
  234. break;
  235. }
  236. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/choi" , "false");
  237. }
  238. }
  239. }
  240. else if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/bcgbn") == "false"){
  241. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/bcgbn","true");
  242. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+row+"]/choi" , "true");
  243. grd_TestInfoCnts.cellstyle("background-image", row, 1) = "../../../lis/commonweb/images/chkBC1.gif";
  244. grd_TestInfoCnts.cellstyle("background-position", row, 1) = "center"
  245. if(row + 1 <= grd_TestInfoCnts.rows- 1){
  246. for(iRow = row + 1 ; ; iRow ++ ){
  247. if(model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn") == "true" ||
  248. model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/bcgbn") == "false" ||
  249. iRow > grd_TestInfoCnts.rows- 1){
  250. break;
  251. }
  252. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+iRow+"]/choi" , "true");
  253. }
  254. }
  255. }
  256. }
  257. }
  258. }
  259. else{
  260. var row = poctgrid.row;
  261. var col = poctgrid.col;
  262. if(poctgrid.isCell(event.target) && poctgrid.row >= poctgrid.fixedRows){
  263. if(col == 1){
  264. if(model.getvalue("/root/main/poctlist["+row+"]/bcgbn") == "true"){
  265. model.setvalue("/root/main/poctlist["+row+"]/bcgbn","false");
  266. model.setvalue("/root/main/poctlist["+row+"]/choi" , "false");
  267. poctgrid.cellstyle("background-image", row, 1) = "../../../lis/commonweb/images/chkBC0.gif";
  268. poctgrid.cellstyle("background-position", row, 1) = "center"
  269. if(row + 1 <= poctgrid.rows- 1){
  270. for(iRow = row + 1 ; ; iRow ++ ){
  271. if(model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn") == "true" ||
  272. model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn") == "false" ||
  273. iRow > poctgrid.rows- 1){
  274. break;
  275. }
  276. model.setvalue("/root/main/poctlist["+iRow+"]/choi" , "false");
  277. }
  278. }
  279. }
  280. else if(model.getvalue("/root/main/poctlist["+row+"]/bcgbn") == "false"){
  281. model.setvalue("/root/main/poctlist["+row+"]/bcgbn","true");
  282. model.setvalue("/root/main/poctlist["+row+"]/choi" , "true");
  283. poctgrid.cellstyle("background-image", row, 1) = "../../../lis/commonweb/images/chkBC1.gif";
  284. poctgrid.cellstyle("background-position", row, 1) = "center"
  285. if(row + 1 <= poctgrid.rows- 1){
  286. for(iRow = row + 1 ; ; iRow ++ ){
  287. if(model.getvalue("/root/main/poctlist["+iRow+"]/bcgbn") == "true" ||
  288. model.getvalue("/root/main/poctlists["+iRow+"]/bcgbn") == "false" ||
  289. iRow > poctgrid.rows- 1){
  290. break;
  291. }
  292. model.setvalue("/root/main/poctlist["+iRow+"]/choi" , "true");
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. function fExeSave(){
  301. //fSaveChk();
  302. /*
  303. var chk = false;
  304. for(i = 1 ; i < grd_TestInfoCnts.rows ; i ++){
  305. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/testcd") == "LOS101"){
  306. grd_TestInfoCnts.rowStatus(i) = 0;
  307. model.setValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi", "false");
  308. chk = true;
  309. }
  310. }
  311. if(chk){
  312. alert("Glucose(Strip)(POCT) 검사는 조회만 가능 합니다.");
  313. }
  314. */
  315. var jaewonyn = model.getValue("/root/main/getJaeWonTrue/jaewonyn");
  316. var prcpgenrflag = model.getValue("/root/hidden/ref/prcpgenrflag");
  317. var execddyncnt = 0;
  318. for(i = 1 ; i < grd_TestInfoCnts.rows ; i ++){
  319. grd_TestInfoCnts.rowStatus(i) = 0;
  320. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi") == "true"){
  321. grd_TestInfoCnts.rowStatus(i) = 2;
  322. //액팅이 된 처방인지 체크
  323. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/execdd") != "00000000") {
  324. execddyncnt++;
  325. }
  326. }
  327. }
  328. if(jaewonyn == "Y" && prcpgenrflag == "1"){
  329. if(execddyncnt == 0) {
  330. messageBox("입원 환자는 외래처방의 채혈 및 접수가 불가능합니다.", "I");
  331. return;
  332. }
  333. }else if(jaewonyn == "N" && prcpgenrflag == "2"){
  334. if(execddyncnt == 0) {
  335. messageBox("재원중인 환자만 입원처방의 채혈 및 접수가 가능합니다.", "I");
  336. return;
  337. }
  338. }
  339. model.setValue("/root/send/userid", model.getValue("/root/hidden/ref/userid"));
  340. model.setValue("/root/send/pid", model.getValue("/root/hidden/ref/pid"));
  341. model.setValue("/root/send/data1", grd_TestInfoCnts.getUpdateData());
  342. //alert(grd_TestInfoCnts.getUpdateData());
  343. submit("TXLLR91101");
  344. fOpenList();
  345. //fOpenList();
  346. }
  347. function freprint(){
  348. //model.removeNodeset("/root/main/poctlist/");
  349. model.setValue("/root/send/pid", model.getValue("/root/hidden/ref/pid"));
  350. model.setValue("/root/send/sdd", model.getValue("/root/hidden/ref/sdd"));
  351. model.setValue("/root/send/edd", model.getValue("/root/hidden/ref/edd"));
  352. submit("TRLLR91102");
  353. fRemark(2);
  354. }
  355. function fReExeSave(){
  356. var chk = false;
  357. for(i = 1 ; i < poctgrid.rows ; i ++){
  358. if(model.getValue("/root/main/poctlist["+i+"]/choi") == "true"){
  359. if(model.getValue("/root/main/poctlist["+i+"]/testcd") == "LOS101"){
  360. poctgrid.rowStatus(i) = 0;
  361. model.setValue("/root/main/poctlist["+i+"]/choi", "false");
  362. chk = true;
  363. }
  364. }else{
  365. if(model.getValue("/root/main/poctlist["+i+"]/testcd") == "LOS101"){
  366. poctgrid.rowStatus(i) = 0;
  367. model.setValue("/root/main/poctlist["+i+"]/choi", "false");
  368. }
  369. }
  370. }
  371. if(chk){
  372. alert("Glucose(Strip)(POCT) 검사는 조회만 가능 합니다.");
  373. }
  374. model.setValue("/root/send/userid", model.getValue("/root/hidden/ref/userid"));
  375. model.setValue("/root/send/data2", poctgrid.getUpdateData());
  376. submit("TXLLR91102");
  377. freprint();
  378. }
  379. function frsltdown(){
  380. var gRow = grd_TestInfoCnts.row;
  381. if(grd_TestInfoCnts.col == 7){
  382. if(event.keyCode == 13){
  383. if(gRow < grd_TestInfoCnts.rows){
  384. model.setValue("/root/main/getPoctlist/getTestInfoCnts["+grd_TestInfoCnts.row+"]/choi", "true");
  385. var tclscd = model.getValue("/root/main/getPoctlist/getTestInfoCnts["+grd_TestInfoCnts.row+"]/tclscd");
  386. grd_TestInfoCnts.row = gRow + 1;
  387. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+grd_TestInfoCnts.row+"]/bcgbn") != "true"){
  388. for(i=gRow ; i > 0 ; i--){
  389. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclskind") == "1"){
  390. if(tclscd == model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclscd")){
  391. model.setValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi", "true");
  392. return;
  393. }
  394. }
  395. }
  396. }
  397. }
  398. }
  399. }
  400. //model.refresh();
  401. }
  402. function fpoctdown(){
  403. if(poctgrid.col == 6){
  404. if(event.keyCode == 13){
  405. if(poctgrid.row < poctgrid.rows){
  406. if(model.getValue("/root/main/poctlist["+poctgrid.row+"]/testcd") == "LOS101"){
  407. alert("Glucose(Strip)(POCT) 검사는 수정할수 없습니다.");
  408. poctgrid.rowStatus(poctgrid.row) = 0;
  409. poctgrid.row = poctgrid.row + 1;
  410. }else{
  411. model.setValue("/root/main/poctlist["+poctgrid.row+"]/choi", "true");
  412. poctgrid.row = poctgrid.row + 1;
  413. }
  414. }
  415. }
  416. }
  417. model.refresh();
  418. }
  419. function fchecktrue(){
  420. for(i=1 ; i < grd_TestInfoCnts.rows ; i++){
  421. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi") == "true"){
  422. grd_TestInfoCnts.rowStatus(i) = 2;
  423. }
  424. else{
  425. grd_TestInfoCnts.rowStatus(i) = 0;
  426. }
  427. }
  428. }
  429. function fcheckfalse(){
  430. for(i=1 ; i < poctgrid.rows ; i++){
  431. if(model.getValue("/root/main/poctlist["+i+"]/choi") == "true"){
  432. poctgrid.rowStatus(i) = 2;
  433. }
  434. else{
  435. poctgrid.rowStatus(i) = 0;
  436. }
  437. }
  438. }
  439. function fUserNMRef(){
  440. if(event.keyCode == 13){
  441. var inputval = ipt_userid.currentText;
  442. model.setValue("/root/hidden/ref/userid", inputval);
  443. if(model.getvalue("/root/hidden/ref/userid") != ""){
  444. model.makeValue("/root/send/userid" , model.getvalue("/root/hidden/ref/userid"));
  445. submit("TRLZZ00104");
  446. }
  447. }
  448. }
  449. function fKeyEvent(){
  450. if(event.keyCode == 13){
  451. // 등록번호
  452. if(event.target == "iptSearch"){
  453. fpidset();
  454. }
  455. // 검사자
  456. if(event.target == "ipt_userid"){
  457. fUserNMRef();
  458. }
  459. }
  460. }
  461. function fpidset(){
  462. var inputval = iptSearch.currentText;
  463. model.setValue("/root/hidden/ref/pid", inputval);
  464. if(model.getvalue("/root/hidden/ref/bcno") != ""){
  465. }
  466. var inputval = iptSearch.currentText;
  467. model.setValue("/root/hidden/ref/pid", inputval);
  468. if(model.getvalue("/root/hidden/ref/pid") != ""){
  469. model.setValue("/root/hidden/ref/pidstr" , inputval);
  470. //model.setValue("/root/hidden/ref/pid" , iptSearch.currentText);
  471. model.makeValue("/root/send/pid" , inputval);
  472. //입원 환자 여부 조회
  473. submit("TRLLR91103");
  474. var jaewonyn = model.getValue("/root/main/getJaeWonTrue/jaewonyn");
  475. if(jaewonyn == "Y"){
  476. model.setValue("/root/hidden/ref/prcpgenrflag", "2");
  477. }else{
  478. model.setValue("/root/hidden/ref/prcpgenrflag", "1");
  479. }
  480. model.setValue("/root/send/prcpgenrflag", model.getValue("/root/hidden/ref/prcpgenrflag"));
  481. submit("TRLLR91101");
  482. fRemark(1);
  483. freprint();
  484. iptSearch.selBegin = 0;
  485. iptSearch.selEnd = iptSearch.currentText.length;
  486. model.setFocus("iptSearch");
  487. }
  488. }
  489. function fprcpgenrflagset(){
  490. var inputval = iptSearch.currentText;
  491. model.setValue("/root/hidden/ref/pid", inputval);
  492. if(model.getvalue("/root/hidden/ref/pid") != ""){
  493. model.setValue("/root/hidden/ref/pidstr" , inputval);
  494. //model.setValue("/root/hidden/ref/pid" , iptSearch.currentText);
  495. model.makeValue("/root/send/pid" , inputval);
  496. if(model.getValue("/root/hidden/ref/prcpgenrflag") == ""){
  497. messageBox("처방구분을 선택해주세요.", "I");
  498. return;
  499. }
  500. model.setValue("/root/send/prcpgenrflag", model.getValue("/root/hidden/ref/prcpgenrflag"));
  501. submit("TRLLR91101");
  502. fRemark(1);
  503. freprint();
  504. iptSearch.selBegin = 0;
  505. iptSearch.selEnd = iptSearch.currentText.length;
  506. model.setFocus("iptSearch");
  507. }
  508. }
  509. function fGetMouseDown(grid){
  510. var pGrid = grid;
  511. model.removeNodeset("/root/hidden/popupmenu");
  512. if(event.button == 3){ // 라이트클릭 메뉴만들기...
  513. model.makeNode("/root/hidden/popupmenu/grid");
  514. model.makeNode("/root/hidden/popupmenu/grid/item");
  515. if(pGrid.mouseCol== pGrid.colRef("reptrslt")){
  516. var testcd, flag;
  517. if(pGrid == grd_TestInfoCnts){
  518. testcd = model.getvalue("/root/main/getPoctlist/getTestInfoCnts["+pGrid.mouseRow+"]/tclscd");
  519. flag = 1;
  520. }else{
  521. testcd = model.getvalue("/root/main/poctlist["+pGrid.mouseRow+"]/testcd");
  522. flag = 2;
  523. }
  524. //결과코드관련
  525. var n = getNodesetCount("/root/init/LB0109[etc01='" + testcd + "']");
  526. if (n > 0) {
  527. var cdNodes = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/cd");
  528. var cdNodes2 = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/nm");
  529. var dispyn = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/etc03");
  530. for (i = 1; i <= n; i++) {
  531. var cd = cdNodes.item(i - 1).text;
  532. var nm = cdNodes2.item(i - 1).text;
  533. var yn = dispyn.item(i - 1).text;
  534. if(yn == "Y"){
  535. //var cd = model.getvalue("/root/init/LB0109[etc01='" + testcd + "']["+ i +"]/cd");
  536. //var nm = model.getvalue("/root/init/LB0109[etc01='" + testcd + "']["+ i +"]/nm");
  537. model.makeValue("/root/hidden/popupmenu/grid/item["+ i +"]/name" , "["+cd+"] "+ nm);
  538. model.makeValue("/root/hidden/popupmenu/grid/item["+ i +"]/func" , nm + "▦" +pGrid.mouseRow + "▦" + flag);
  539. //model.makeValue("/root/hidden/popupmenu/grid/item["+i+"]/value" , cd);
  540. }
  541. }
  542. }
  543. }
  544. if(pGrid.isCell(event.target) && pGrid.mouseRow >= pGrid.fixedrows){
  545. window.setPopupMenu(true , "/root/hidden/popupmenu/grid/item" , "name", "func" , true);
  546. //setPopupMenu("grd_TestInfoCnts" , true, "/root/hidden/popupmenu/grid/item", "name", "func");
  547. }else{
  548. window.setPopupMenu(false);
  549. }
  550. }
  551. }
  552. function fOnmenu(popupParam){
  553. if(popupParam != ""){
  554. var aL = popupParam.split("▦");
  555. fRsltCode(aL[0] , aL[1], aL[2]);
  556. }
  557. }
  558. function fRsltCode(nm , pRow , flag){
  559. if(flag == 1){
  560. model.setvalue("/root/main/getPoctlist/getTestInfoCnts["+pRow+"]/reptrslt" ,nm);
  561. }else{
  562. model.setvalue("/root/main/poctlist["+pRow+"]/reptrslt", nm);
  563. }
  564. }
  565. function fSaveChk() {
  566. var oldbcno = "";
  567. for(i=1 ; i < grd_TestInfoCnts.rows ; i++){
  568. if(oldbcno != "" && model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcgbn") == "true"
  569. && model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi") == "true"){
  570. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno") != oldbcno){
  571. oldbcno = model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno");
  572. fSaveChk2(oldbcno);
  573. }
  574. }
  575. if(oldbcno == "" && model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcgbn") == "true"
  576. && model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/choi") == "true"){
  577. oldbcno = model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno");
  578. fSaveChk2(oldbcno);
  579. }
  580. }
  581. }
  582. function fSaveChk2(bcno){
  583. var chk = 0;
  584. for(i=1 ; i < grd_TestInfoCnts.rows ; i++){
  585. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno") == bcno){
  586. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/reptrslt") == "" && (model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclskind") == "2"
  587. || model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclskind") == "4" || model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclskind") == "5")){
  588. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno").length == 9){
  589. alert(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno") + " 에 누락된 결과가 있어 저장할 수 없습니다.");
  590. }else{
  591. alert(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/tclsnm") + " 에 누락된 결과가 있어 저장할 수 없습니다.");
  592. }
  593. fNonSave(bcno);
  594. return;
  595. }
  596. }
  597. }
  598. }
  599. function fNonSave(bcno){
  600. for(i=1 ; i < grd_TestInfoCnts.rows ; i++){
  601. if(model.getValue("/root/main/getPoctlist/getTestInfoCnts["+i+"]/bcno") == bcno){
  602. grd_TestInfoCnts.rowStatus(i) = 0;
  603. }
  604. }
  605. }
  606. ]]>
  607. </script>
  608. </xhtml:head>
  609. <xhtml:body pagewidth="820" pageheight="770" style="font-weight:bold; margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  610. <group id="group1" style="left:0px; top:0px; width:795px; height:705px; ">
  611. <caption id="caption2" class="tit_2" style="left:0px; top:1px; width:126px; height:13px; ">현장검사결과등록</caption>
  612. <line id="line1" class="line_1" style="x1:0px; y1:69px; x2:780px; y2:69px; "/>
  613. <line id="line2" class="line_1" style="x1:0px; y1:16px; x2:780px; y2:16px; "/>
  614. <caption id="caption5" class="cell_1" style="left:0px; top:-140px; width:72px; height:23px; vertical-align:middle; ">환자명</caption>
  615. <output id="patnm" ref="/root/main/getPoctlist/patnm/pname" class="output_fix" style="left:350px; top:23px; width:135px; height:19px; "/>
  616. <line id="line3" class="line_2" style="x1:0px; y1:45px; x2:780px; y2:45px; "/>
  617. <caption id="caption3" class="cell_1" style="left:490px; top:21px; width:72px; height:23px; text-align:center; vertical-align:middle; ">검 사 자</caption>
  618. <caption id="caption4" class="cell_1" style="left:0px; top:21px; width:72px; height:23px; text-align:center; vertical-align:middle; ">등 록 번 호</caption>
  619. <caption id="caption9" class="cell_1" style="left:275px; top:21px; width:72px; height:23px; text-align:center; vertical-align:middle; ">환 자 명</caption>
  620. <output id="input1" ref="/root/hidden/ref/pid" class="output_fix" appearance="output" style="left:75px; top:23px; width:85px; height:19px; "/>
  621. <input id="ipt_userid" ref="/root/hidden/ref/userid" style="left:565px; top:23px; width:70px; height:19px; "/>
  622. <output id="output1" ref="/root/main/getUsernm/usernm" class="output_fix" style="left:638px; top:23px; width:75px; height:19px; "/>
  623. <button id="button23" class="btn3_letter2" style="left:719px; top:21px; width:56px; height:22px; ">
  624. <caption>저장</caption>
  625. <script type="javascript" ev:event="onclick">
  626. <![CDATA[
  627. fExeSave();
  628. ]]>
  629. </script>
  630. </button>
  631. <datagrid id="grd_TestInfoCnts" nodeset="/root/main/getPoctlist/getTestInfoCnts" class="datagrid2" caption="바코드^바코드^바코드^바코드번호^bcno^처방일자^검사명^검사결과^단위^검체명^참고치^수납^처방구분^execdeptcd^tclscd^testlrgkind^execdd" colsep="▦" colwidth="0, 30, 25, 70, 0, 80, 200, 65, 55, 90, 85, 40, 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100,0" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheight="32" rowsep="▩" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:74px; width:780px; height:311px; border-color:#c0c0c0; ">
  632. <col ref="bcgbn" type="output" uncheckimage="1" style="left:20px; top:32px; width:43px; height:23px; "/>
  633. <col ref="bcbtn" type="output" uncheckimage="1" style="left:20px; top:32px; width:43px; height:23px; "/>
  634. <col checkvalue="true,false" ref="choi" type="checkbox"/>
  635. <col ref="bcno2"/>
  636. <col ref="bcno"/>
  637. <col ref="prcpdd" format="yyyy-mm-dd"/>
  638. <col ref="tclsnm"/>
  639. <col ref="reptrslt" type="input"/>
  640. <col ref="rsltunit"/>
  641. <col ref="spcnm"/>
  642. <col ref="ref"/>
  643. <col ref="rcptyn" style="text-align:center; "/>
  644. <col ref="prcpgenrflagnm"/>
  645. <col ref="execdeptcd" visibility="hidden"/>
  646. <col ref="testcd" visibility="hidden"/>
  647. <col ref="tclscd" visibility="hidden"/>
  648. <col ref="testlrgkind" visibility="hidden"/>
  649. <col ref="spccd" visibility="hidden" style="left:683px; top:32px; width:100px; height:23px; "/>
  650. <col ref="prcpgenrflag" visibility="hidden"/>
  651. <col ref="prcpno" visibility="hidden"/>
  652. <col ref="prcphopedd" visibility="hidden"/>
  653. <col ref="execprcpuniqno" visibility="hidden"/>
  654. <col ref="prcpdd2" visibility="hidden"/>
  655. <col ref="rcptstatcd" visibility="hidden"/>
  656. <col ref="execdd" visibility="hidden"/>
  657. <script type="javascript" ev:event="onclick">
  658. <![CDATA[
  659. fSetGridChoi(1);
  660. ]]>
  661. </script>
  662. <script type="javascript" ev:event="onkeydown">
  663. <![CDATA[
  664. frsltdown();
  665. ]]>
  666. </script>
  667. <script type="javascript" ev:event="onmousedown">
  668. <![CDATA[
  669. fGetMouseDown(grd_TestInfoCnts);
  670. ]]>
  671. </script>
  672. </datagrid>
  673. <caption id="caption6" class="cell_1" style="left:0px; top:391px; width:72px; height:23px; text-align:center; vertical-align:middle; ">조 회 구 간</caption>
  674. <caption id="caption7" style="left:198px; top:393px; width:15px; height:20px; ">~</caption>
  675. <line id="line4" class="line_1" style="x1:0px; y1:415px; x2:780px; y2:415px; "/>
  676. <button id="button1" class="btn3_letter2" style="left:666px; top:392px; width:56px; height:22px; ">
  677. <caption>조회</caption>
  678. <script type="javascript" ev:event="onclick">
  679. <![CDATA[
  680. freprint();
  681. ]]>
  682. </script>
  683. </button>
  684. <button id="button2" class="btn3_letter2" style="left:724px; top:392px; width:56px; height:22px; ">
  685. <caption>수정</caption>
  686. <script type="javascript" ev:event="onclick">
  687. <![CDATA[
  688. fReExeSave();
  689. ]]>
  690. </script>
  691. </button>
  692. <datagrid id="poctgrid" nodeset="/root/main/poctlist" class="datagrid2" caption="바코드^바코드^바코드^바코드번호^bcno^검사명^검사결과^단위^검체명^참고치^결과일시^검사자" colsep="▦" colwidth="0, 50, 25, 80, 0, 170, 65, 50, 80,80, 125, 100, 100, 100, 100, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheight="32" rowsep="▩" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" bind="bind_grd_TestInfoCnts" style="left:0px; top:420px; width:780px; height:280px; border-color:#c0c0c0; ">
  693. <col ref="bcgbn" type="output" uncheckimage="1" style="left:20px; top:32px; width:43px; height:23px; "/>
  694. <col ref="bcbtn" type="output" uncheckimage="1" style="left:20px; top:32px; width:43px; height:23px; "/>
  695. <col checkvalue="true,false" ref="choi" type="checkbox"/>
  696. <col ref="bcno2"/>
  697. <col ref="bcno"/>
  698. <col ref="tclsnm"/>
  699. <col ref="reptrslt" type="input"/>
  700. <col ref="ref"/>
  701. <col ref="spcnm"/>
  702. <col ref="refval"/>
  703. <col ref="reptdd" format="yyyy-mm-dd hh:nn:ss"/>
  704. <col ref="reptnm"/>
  705. <col ref="testcd" visibility="hidden"/>
  706. <col ref="spccd" visibility="hidden"/>
  707. <col ref="rsltseq" visibility="hidden"/>
  708. <col ref="testlrgkind" visibility="hidden"/>
  709. <script type="javascript" ev:event="onclick">
  710. <![CDATA[
  711. fSetGridChoi(0);
  712. ]]>
  713. </script>
  714. <script type="javascript" ev:event="onkeydown">
  715. <![CDATA[
  716. fpoctdown();
  717. ]]>
  718. </script>
  719. <script type="javascript" ev:event="onmousedown">
  720. <![CDATA[
  721. fGetMouseDown(poctgrid);
  722. ]]>
  723. </script>
  724. </datagrid>
  725. <input id="ipt_usdt" ref="/root/hidden/ref/sdd" class="input_s_essential" inputtype="date" style="left:77px; top:393px; width:110px; height:19px; "/>
  726. <input id="ipt_uedt" ref="/root/hidden/ref/edd" class="input_s_essential" inputtype="date" style="left:217px; top:393px; width:110px; height:19px; "/>
  727. <input id="iptSearch" ref="/root/hidden/ref/pid" class="input_button" navindex="1" imemode="alpha" inputtype="button" style="left:163px; top:23px; width:95px; height:19px; ">
  728. <script type="javascript" ev:event="onbuttonclick">
  729. <![CDATA[
  730. fpidset();
  731. ]]>
  732. </script>
  733. <!--
  734. <script type="javascript" ev:event="onkeyup">
  735. <![CDATA[
  736. fpidset();
  737. ]]>
  738. </script>-->
  739. </input>
  740. <caption id="caption1" class="cell_1" style="left:0px; top:47px; width:72px; height:20px; text-align:center; vertical-align:middle; ">처 방 구 분</caption>
  741. <select1 id="rad_prcpgenrflag" ref="/root/hidden/ref/prcpgenrflag" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:75px; top:49px; width:105px; height:20px; border-style:none; ">
  742. <choices>
  743. <item>
  744. <label>외래</label>
  745. <value>1</value>
  746. </item>
  747. <item>
  748. <label>입원</label>
  749. <value>2</value>
  750. </item>
  751. </choices>
  752. <script type="javascript" ev:event="xforms-value-changed">
  753. <![CDATA[
  754. fprcpgenrflagset();
  755. ]]>
  756. </script>
  757. </select1>
  758. <input id="ipt_3" ref="/root/hidden/ref/bcno" visibility="hidden" appearance="input" style="left:325px; top:49px; width:100px; height:19px; ">
  759. <script type="javascript" ev:event="onbuttonclick">
  760. <![CDATA[
  761. fpidset();
  762. ]]>
  763. </script>
  764. </input>
  765. <caption id="caption8" class="cell_1" visibility="hidden" style="left:250px; top:49px; width:72px; height:23px; text-align:center; vertical-align:middle; ">바코드번호</caption>
  766. <caption id="caption10" style="left:630px; top:50px; width:145px; height:15px; color:#ff0000; ">수납:V는 VIP 대상자임</caption>
  767. </group>
  768. <group id="group2" style="left:0px; top:710px; width:785px; height:27px; ">
  769. <button id="button9" class="btn4_letter2" style="left:724px; top:5px; width:56px; height:22px; ">
  770. <caption>닫기</caption>
  771. <script type="javascript" ev:event="DOMActivate">
  772. <![CDATA[
  773. fExeCancel();
  774. ]]>
  775. </script>
  776. </button>
  777. </group>
  778. <script type="javascript" ev:event="onmenu">
  779. <![CDATA[
  780. var popupParam = event.description;
  781. fOnmenu(popupParam);
  782. ]]>
  783. </script>
  784. <script type="javascript" ev:event="onkeypress">
  785. <![CDATA[
  786. fKeyEvent();
  787. ]]>
  788. </script>
  789. </xhtml:body>
  790. </xhtml:html>