MRF02600.js 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. /**
  2. * @desc : 초기 정보 셋팅
  3. *
  4. * @param :
  5. * @return :
  6. * @author : HIT EMR Team
  7. * @---------------------------------------------------
  8. */
  9. function fInit(){
  10. //20111007
  11. //하드코드 테이블 체크
  12. fGetHardCDList("N", 5560, 0 , "/root/init/hardcditem");
  13. //20111007
  14. mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/resnable", 5992);
  15. gResnablecnt = getNodeSetCnt("/root/init/resnable/hardcd[hardcd = 'Y']"); //사유입력사용여부
  16. model.setValue("/root/main/term/termfromdd", getCurrentDate());
  17. model.setValue("/root/main/term/termtodd", getCurrentDate());
  18. model.removeNodeset("/root/temp/deptinfo/dept");
  19. model.removeNodeset("/root/temp/wardinfo/dept");
  20. //fGetDeptlist("root/send/reqdata", "/root/main/dept/orddept", "total", getUserInfo("dutplceinstcd"));
  21. zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  22. copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
  23. copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept");
  24. addComboItem("cmb_rtndept", "전체", "-", "above");
  25. addComboItem("cmb_orddept", "전체", "-", "above");
  26. //fGetWardlist("root/send/reqdata", "/root/main/dept/ward", "");
  27. zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "W", "/root/temp/wardinfo", "depthngnm", "asc");
  28. copyNodeset("/root/hidden/dept/ward", "/root/temp/wardinfo/dept");
  29. addComboItem("cmb_wardlist", "전체", "-", "above");
  30. copyNodeset("/root/hidden/dept/rtndept", "/root/main/hidden/ward", "append");
  31. if(checkOpener()){
  32. sParamMsg = opener.javascript.getParameter("SMRF02600_Param");
  33. if(sParamMsg != ""){
  34. model.setValue("/root/main/pid", getArrayData(sParamMsg,1,0));
  35. model.setValue("/root/main/term/termfromdd", getArrayData(sParamMsg,1,1));
  36. model.setValue("/root/main/term/termtodd", getArrayData(sParamMsg,1,1));
  37. } else {
  38. fGetPatInfo();
  39. }
  40. } else {
  41. fGetPatInfo();
  42. }
  43. fGetFormlist("root/send/reqdata", "/root/main/forminfo", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd"));
  44. //fGetFormlist("root/send/reqdata", "/root/gridData/row", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd"));
  45. fSetIOFlag();
  46. //grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("statcd");
  47. grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("formnm");
  48. model.setValue("/root/main/rtncnfm", "-");
  49. chk_state2.disabled = true;
  50. chk_state3.disabled = true;
  51. chk_state4.disabled = true;
  52. chk_state5.disabled = true;
  53. model.setValue("/root/main/scanyn", "");
  54. model.setValue("/root/main/dept/ward", "-");
  55. // 2010.03.10. 이은영
  56. // OCR 반납화면 스켄자료 출력 가능 부서 - 하드코드(9932)
  57. model.makeValue("/root/send/ocrprnthrdcd", "9932");
  58. model.makeNode("/root/init/ocrprnthrdcd");
  59. mmbfGetHardCodeInfo("/root/send/ocrprnthrdcd", "/root/init/ocrprnthrdcd", 9932);
  60. var dutplcecd = getUserInfo("dutplcecd");
  61. model.makeValue("/root/hidden/dutplcecd", dutplcecd);
  62. var OcrPrntCnt = getNodesetCnt(model, "/root/init/ocrprnthrdcd/hardcd[hardcd = '" + dutplcecd + "']");
  63. if (OcrPrntCnt > 0) {
  64. btn_ocrrecview.disabled = false;
  65. }
  66. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  67. mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/dutplcecd", 5501);
  68. //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
  69. if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
  70. // KNUH_20101207_박성호_end
  71. // 2008-07-15 정영석 요청
  72. // 간호에서 바코드 반납 및 이력보기를 띄울 수 있도록 요청함
  73. //btn_barcode.disabled = false;
  74. //btn_histview.disabled = false;
  75. btn_rtn.disabled = false;
  76. btn_rntcancel.disabled = false;
  77. btn_rtncnfm.disabled = false;
  78. btn_cnfmcancel.disabled = false;
  79. btn_prntcancel.disabled = false;
  80. btn_delcancel.disabled = false;
  81. btn_excel.disabled = false;
  82. btn_ocrrecview.disabled = false;
  83. }
  84. //2010-03-18 오전 10:27:07 이환석
  85. //병동간호, 응급간호 등 입원간호 메뉴그룹의 동의서 및 기타출력 서식 반납 화면에서
  86. //구분 초기설정을 메뉴 paramter값에 따라 달리 한다.(parameter값 없을 경우 default)
  87. var menuparam = getScreenMenuParameter();
  88. //바로가기로 OCR반납 화면을 들어갔을 경우 null이 문자로 들어감.
  89. if(menuparam == "null") {
  90. model.setValue("/root/main/flag", "ORD");
  91. } else if(menuparam != "") {
  92. model.setValue("/root/main/flag", menuparam);
  93. }
  94. //2013/02/21 Start
  95. model.setValue("/root/main/eocryn", "-");
  96. model.setValue("/root/main/scanyn", "-");
  97. //2013/02/21 End
  98. model.refresh();
  99. }
  100. /**
  101. * @desc : 동의서 및 기타 출력서식 반납 조회
  102. *
  103. * @param :
  104. * @return :
  105. * @author : HIT EMR Team
  106. * @---------------------------------------------------
  107. */
  108. function fSearch(){
  109. //20111010
  110. model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/term/termfromdd"));
  111. model.makeValue("/root/send/reqdata/termtodd", model.getValue("/root/main/term/termtodd"));
  112. submit("TRMRF02699");
  113. if(model.getValue("/root/cond/check")> 31){
  114. if(model.getValue("/root/main/pid")=="" && model.getValue("/root/inputSearchData")==""){
  115. alert("조회기간이 31일 이상이면 등록번호 또는 서식명 선택이 필수입니다!");
  116. return;
  117. }
  118. }
  119. //20111010
  120. fSetDeptValue(); //2010.02.18, hkjoo
  121. var sendPath = "/root/send/reqdata/ocrprnt";
  122. var statcd = model.getValue("/root/main/rtncnfm");
  123. statcd = statcd.split(" ").join("|");
  124. model.makeValue(sendPath + "/dateflag", model.getValue("/root/main/flag"));
  125. model.makeValue(sendPath + "/termfromdd", model.getValue("/root/main/term/termfromdd"));
  126. model.makeValue(sendPath + "/termtodd", model.getValue("/root/main/term/termtodd"));
  127. model.makeValue(sendPath + "/prntdeptcd", model.getValue("/root/main/dept/prntdept"));
  128. model.makeValue(sendPath + "/rtndeptcd", model.getValue("/root/main/dept/rtndept"));
  129. model.makeValue(sendPath + "/orddeptcd", model.getValue("/root/main/dept/orddept"));
  130. model.makeValue(sendPath + "/wardcd", model.getValue("/root/main/dept/ward"));
  131. model.makeValue(sendPath + "/ioflag", model.getValue("/root/main/ioflag"));
  132. model.makeValue(sendPath + "/rtncnfm", statcd);
  133. model.makeValue(sendPath + "/scanyn", model.getValue("/root/main/scanyn"));
  134. model.makeValue(sendPath + "/eocryn", model.getValue("/root/main/eocryn"));
  135. model.makeValue(sendPath + "/exdsc", model.getValue("/root/main/exdsc"));
  136. model.makeValue(sendPath + "/lstupdtdeptnm", model.getValue("/root/main/lstupdtdeptnm"));
  137. model.makeValue(sendPath + "/lstupdtusernm", model.getValue("/root/main/lstupdtusernm"));
  138. model.makeValue(sendPath + "/verflag", "A");
  139. model.makeValue(sendPath + "/inputflag", "A");
  140. if(model.getValue("/root/inputSearchData")==""){
  141. model.makeValue(sendPath + "/formcd", "");
  142. model.makeValue(sendPath + "/formfromdt", "");
  143. }else{
  144. model.makeValue(sendPath + "/formcd", model.getValue("/root/inputSelectValue"));
  145. model.makeValue(sendPath + "/formfromdt", model.getValue("/root/inputSelectValue2"));
  146. }
  147. //2012/05/22 End
  148. model.makeValue(sendPath + "/pid", model.getValue("/root/main/pid"));
  149. submit("TRMRF02604");
  150. //grd_ocrprntlist.clearStatus();
  151. grd_ocrprntlist.rebuildStyle();
  152. //grd_ocrprntlist.cellStyle("background-image", grd_ocrprntlist.row, 1) = "../../../com/commonweb/images/icon_n.gif";
  153. model.removeNodeset("/root/send/reqdata");
  154. model.refresh();
  155. }
  156. /**
  157. * @desc : 부서리스트 조회
  158. *
  159. * @param :
  160. * @return :
  161. * @author : HIT EMR Team
  162. * @---------------------------------------------------
  163. */
  164. function fGetDeptlist(ref, rsltRef, queryflag, dutplceinstcd){
  165. if(queryflag != null)
  166. model.makeValue(ref + "/queryflag", queryflag);
  167. if(dutplceinstcd != null)
  168. model.makeValue(ref + "/dutplceinstcd", dutplceinstcd);
  169. submit("TRMRF02601", true, ref, rsltRef);
  170. }
  171. /**
  172. * @desc : 병동리스트 조회
  173. *
  174. * @param :
  175. * @return :
  176. * @author : HIT EMR Team
  177. * @---------------------------------------------------
  178. */
  179. function fGetWardlist(ref, rsltRef, queryflag){
  180. if(queryflag != null)
  181. model.makeValue(ref + "/queryflag", queryflag);
  182. submit("TRMRF02602", true, ref, rsltRef);
  183. }
  184. /**
  185. * @desc : 폼리스트 조회
  186. *
  187. * @param :
  188. * @return :
  189. * @author : HIT EMR Team
  190. * @---------------------------------------------------
  191. */
  192. function fGetFormlist(ref, rsltRef, queryflag, dutplceinstcd){
  193. if(queryflag != null)
  194. model.makeValue(ref + "/queryflag", queryflag);
  195. if(dutplceinstcd != null)
  196. model.makeValue(ref + "/dutplceinstcd", dutplceinstcd);
  197. submit("TRMRF02603", true, ref, rsltRef);
  198. }
  199. /**
  200. * @desc : 출력부서리스트 조회
  201. *
  202. * @param :
  203. * @return :
  204. * @author : HIT EMR Team
  205. * @---------------------------------------------------
  206. */
  207. function fGetPrntDeptlist(ioflag){
  208. model.removeNodeset("/root/temp/deptinfo/dept");
  209. switch(ioflag){
  210. case "A":
  211. zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  212. copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
  213. copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept");
  214. copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/ward", "append");
  215. addComboItem("cmb_rtndept", "전체", "-", "above");
  216. addComboItem("cmb_orddept", "전체", "-", "above");
  217. copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/rtndept");
  218. break;
  219. case "O":
  220. zsdfGetOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  221. copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
  222. copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
  223. addComboItem("cmb_orddept", "전체", "-", "above");
  224. addComboItem("cmb_prntdept", "전체", "-", "above");
  225. model.removeNodeset("/root/temp/deptinfo/dept");
  226. zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  227. copyNodeset("/root/hidden/dept/rtndept", "/root/temp/deptinfo/dept");
  228. addComboItem("cmb_rtndept", "전체", "-", "above");
  229. break;
  230. case "I":
  231. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  232. copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
  233. copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
  234. copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append");
  235. addComboItem("cmb_orddept", "전체", "-", "above");
  236. addComboItem("cmb_prntdept", "전체", "-", "above");
  237. copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace");
  238. break;
  239. case "E":
  240. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
  241. copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
  242. copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
  243. copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append");
  244. addComboItem("cmb_orddept", "전체", "-", "above");
  245. addComboItem("cmb_prntdept", "전체", "-", "above");
  246. copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace");
  247. break;
  248. }
  249. }
  250. /**
  251. * @desc : 입원/외래 구분정보 셋팅
  252. *
  253. * @param :
  254. * @return :
  255. * @author : HIT EMR Team
  256. * @---------------------------------------------------
  257. */
  258. function fSetIOFlag(){
  259. if((rdo_ioflag.value == "I") || (rdo_ioflag.value == "E") || (rdo_ioflag.value == "A")){
  260. cmb_wardlist.disabled = false;
  261. if(rdo_ioflag.value == "I"){
  262. fGetPrntDeptlist("I");
  263. }else if(rdo_ioflag.value == "E"){
  264. fGetPrntDeptlist("E");
  265. }else if(rdo_ioflag.value == "A"){
  266. fGetPrntDeptlist("A");
  267. }
  268. } else {
  269. cmb_wardlist.disabled = true;
  270. if(rdo_ioflag.value == "O"){
  271. fGetPrntDeptlist("O");
  272. }
  273. }
  274. model.refresh();
  275. }
  276. /**
  277. * @desc : 반납부서리스트 조회
  278. *
  279. * @param :
  280. * @return :
  281. * @author : HIT EMR Team
  282. * @---------------------------------------------------
  283. */
  284. function fGetRtnDeptlist(){
  285. zbcfGetCodeList( new Array("A0146"), new Array("/root/init/baseinfo/tmplcdflag"), false );
  286. submit("TRZBC00101");
  287. }
  288. /**
  289. * @desc : 정보저장
  290. *
  291. * @param :
  292. * @return :
  293. * @author : HIT EMR Team
  294. * @---------------------------------------------------
  295. */
  296. function fSetData(){
  297. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  298. var listPath = "/root/main/prntstat/list";
  299. var targetPath="/root/maintemp/prntstat/list";
  300. model.removeNodeset("/root/send/reqdata");
  301. for(var irow = 1; irow <= rowcount; irow++){
  302. if(model.getValue(targetPath + "[" + irow + "]/choice") == "true"){
  303. //copyNodeset("/root/send/reqdata", listPath+"["+irow+"]", "append");
  304. copyNodeset("/root/send/reqdata", targetPath+"["+irow+"]", "append");
  305. }
  306. }
  307. if(submit("TXMRF02605")){
  308. messageBox("", "I001");
  309. } else {
  310. messageBox("", "E009");
  311. }
  312. model.removeNodeset("/root/send/reqdata");
  313. model.removeNodeset("/root/maintemp/prntstat/list");
  314. }
  315. /**
  316. * @desc : 사용자부서 및 반납세팅
  317. *
  318. * @param :
  319. * @return :
  320. * @author : HIT EMR Team
  321. * @---------------------------------------------------
  322. */
  323. function fSetRtn(){
  324. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  325. var listPath = "/root/main/prntstat/list";
  326. var targetPath="/root/maintemp/prntstat/list";
  327. var currDT = getCurrentDate()+getCurrentTime();
  328. model.resetInstanceNode("/root/main/userpopupinfo");
  329. model.setValue("/root/main/userpopupinfo/param", "_OneS_DD");
  330. model.makeValue("/root/main/userpopupinfo/searchitem", getUserInfo("userid"));
  331. model.makeValue("/root/main/userpopupinfo/flag", "userid");
  332. modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  333. var selusr = getParameter("SPZSU10103_");
  334. setCSVToNode("/root/temp/userinfo", selusr);
  335. clearParameter("SPZSU10103_사용자부서선택조회");
  336. for(var irow = 1; irow <= rowcount; irow++){
  337. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  338. //20111007
  339. var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
  340. for(var i=1; i<=parseInt(chkform.length); i++){
  341. if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
  342. alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 반납은 선택진료 신청관리 화면에서만 가능합니다.");
  343. return;
  344. }
  345. }
  346. //20111007
  347. if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
  348. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
  349. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
  350. messageBox("출력상태가 아닌 데이터가","E005");
  351. return;
  352. }
  353. var cnt = model.getXPathValue("count("+targetPath+")");
  354. cnt = parseInt(cnt) + 1;
  355. model.makeNode(targetPath+"["+cnt+"]");
  356. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  357. model.setValue( targetPath+"["+cnt+"]/rtndt", currDT);
  358. model.setValue( targetPath+"["+cnt+"]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
  359. model.setValue( targetPath+"["+cnt+"]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid"));
  360. model.setValue( targetPath+"["+cnt+"]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
  361. model.setValue( targetPath+"["+cnt+"]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm"));
  362. model.setValue( targetPath+"["+cnt+"]/statcd", "R");
  363. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  364. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
  365. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid"));
  366. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
  367. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm"));
  368. /*
  369. model.setValue(listPath + "[" + irow + "]/rtndt", currDT);
  370. model.setValue(listPath + "[" + irow + "]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
  371. model.setValue(listPath + "[" + irow + "]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid"));
  372. model.setValue(listPath + "[" + irow + "]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
  373. model.setValue(listPath + "[" + irow + "]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm"));
  374. model.setValue(listPath + "[" + irow + "]/statcd", "R");
  375. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  376. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
  377. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid"));
  378. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
  379. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm"));*/
  380. if(model.getValue(listPath + "[" + irow + "]/formcd") == "0000001778"){
  381. fGetNewBabyInfo(listPath, irow);
  382. }
  383. }
  384. }
  385. model.refresh();
  386. fSetData();
  387. }
  388. /**
  389. * @desc : 반납확인정보 셋팅
  390. *
  391. * @param :
  392. * @return :
  393. * @author : HIT EMR Team
  394. * @---------------------------------------------------
  395. */
  396. function fSetRtnCnfm(){
  397. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  398. var listPath = "/root/main/prntstat/list";
  399. var targetPath="/root/maintemp/prntstat/list";
  400. var currDT = getCurrentDate()+getCurrentTime();
  401. for(var irow = 1; irow <= rowcount; irow++){
  402. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  403. if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R")
  404. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){
  405. messageBox("반납상태가 아닌 데이터가","E005");
  406. return;
  407. }
  408. var cnt = model.getXPathValue("count("+targetPath+")");
  409. cnt = parseInt(cnt) + 1;
  410. model.makeNode(targetPath+"["+cnt+"]");
  411. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  412. model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", currDT);
  413. model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", getUserInfo("dutplcecd"));
  414. model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", getUserInfo("userid"));
  415. model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", getUserInfo("dutplcenm"));
  416. model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", getUserInfo("usernm"));
  417. model.setValue( targetPath+"["+cnt+"]/statcd", "C");
  418. model.setValue( targetPath+"["+cnt+"]/rtncnfm", "Y");
  419. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  420. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  421. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
  422. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  423. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
  424. /*
  425. model.setValue(listPath + "[" + irow + "]/rtncnfmdt", currDT);
  426. model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", getUserInfo("dutplcecd"));
  427. model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", getUserInfo("userid"));
  428. model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", getUserInfo("dutplcenm"));
  429. model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", getUserInfo("usernm"));
  430. model.setValue(listPath + "[" + irow + "]/statcd", "C");
  431. model.setValue(listPath + "[" + irow + "]/rtncnfm", "Y");
  432. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  433. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  434. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
  435. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  436. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
  437. }
  438. }
  439. model.refresh();
  440. fSetData();
  441. }
  442. /**
  443. * @desc : 반납취소 셋팅
  444. *
  445. * @param :
  446. * @return :
  447. * @author : HIT EMR Team
  448. * @---------------------------------------------------
  449. */
  450. function fSetRtnCancel(){
  451. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  452. var listPath = "/root/main/prntstat/list";
  453. var targetPath="/root/maintemp/prntstat/list";
  454. var currDT = getCurrentDate()+getCurrentTime();
  455. var updtresncnts = model.getValue("/root/tmp/resn");
  456. //의무기록 부서
  457. var cnt = getNodeSetCnt("/root/temp/dutplcecd/hardcd[hardcd = '" + getUserInfo("dutplcecd") + "']");
  458. for(var irow = 1; irow <= rowcount; irow++){
  459. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  460. //20111007
  461. var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
  462. for(var i=1; i<=parseInt(chkform.length); i++){
  463. if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
  464. alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 반납취소는 선택진료 신청관리 화면에서만 가능합니다.");
  465. return;
  466. }
  467. }
  468. //20111007
  469. if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){
  470. messageBox("스캔된 Data는 반납취소를","E001");
  471. return;
  472. }
  473. if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R")
  474. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){
  475. messageBox("반납상태가 아닌 데이터가","E005");
  476. return;
  477. }
  478. if(cnt == 0 && model.getValue(listPath + "[" + irow + "]/prntuserid") != getUserInfo("userid")){
  479. messageBox("출력자와 반납취소자가 동일하지 않아 진행 불가합니다","E");
  480. return;
  481. }
  482. var cnt = model.getXPathValue("count("+targetPath+")");
  483. cnt = parseInt(cnt) + 1;
  484. model.makeNode(targetPath+"["+cnt+"]");
  485. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  486. model.setValue( targetPath+"["+cnt+"]/rtndt", "");
  487. model.setValue( targetPath+"["+cnt+"]/rtndeptcd", "");
  488. model.setValue( targetPath+"["+cnt+"]/rtnuserid", "");
  489. model.setValue( targetPath+"["+cnt+"]/rtndeptnm", "");
  490. model.setValue( targetPath+"["+cnt+"]/rtnusernm", "");
  491. model.setValue( targetPath+"["+cnt+"]/statcd", "CR");
  492. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  493. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  494. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
  495. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  496. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
  497. model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
  498. /*
  499. model.setValue(listPath + "[" + irow + "]/rtndt", "");
  500. model.setValue(listPath + "[" + irow + "]/rtndeptcd", "");
  501. model.setValue(listPath + "[" + irow + "]/rtnuserid", "");
  502. model.setValue(listPath + "[" + irow + "]/rtndeptnm", "");
  503. model.setValue(listPath + "[" + irow + "]/rtnusernm", "");
  504. model.setValue(listPath + "[" + irow + "]/statcd", "CR");
  505. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  506. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  507. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
  508. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  509. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
  510. }
  511. }
  512. model.refresh();
  513. fSetData();
  514. }
  515. /**
  516. * @desc : 반납확인정보 취소 셋팅
  517. *
  518. * @param :
  519. * @return :
  520. * @author : HIT EMR Team
  521. * @---------------------------------------------------
  522. */
  523. function fSetRtnCnfmCancel(){
  524. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  525. var listPath = "/root/main/prntstat/list";
  526. var targetPath="/root/maintemp/prntstat/list";
  527. var currDT = getCurrentDate()+getCurrentTime();
  528. var updtresncnts = model.getValue("/root/tmp/resn");
  529. for(var irow = 1; irow <= rowcount; irow++){
  530. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  531. if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){
  532. messageBox("스캔된 Data는 반납확인 취소를","E001");
  533. return;
  534. }
  535. if(!(model.getValue(listPath + "[" + irow + "]/statcd") == "C")){
  536. messageBox("반납상태가 아닌 데이터가","E005");
  537. return;
  538. }
  539. var cnt = model.getXPathValue("count("+targetPath+")");
  540. cnt = parseInt(cnt) + 1;
  541. model.makeNode(targetPath+"["+cnt+"]");
  542. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  543. model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", "");
  544. model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", "");
  545. model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", "");
  546. model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", "");
  547. model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", "");
  548. model.setValue( targetPath+"["+cnt+"]/statcd", "CC");
  549. model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
  550. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  551. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  552. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
  553. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  554. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
  555. model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
  556. /*
  557. model.setValue(listPath + "[" + irow + "]/rtncnfmdt", "");
  558. model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", "");
  559. model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", "");
  560. model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", "");
  561. model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", "");
  562. model.setValue(listPath + "[" + irow + "]/statcd", "CC");
  563. model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
  564. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  565. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  566. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
  567. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  568. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
  569. }
  570. }
  571. model.refresh();
  572. fSetData();
  573. }
  574. /**
  575. * @desc : 출력 취소 정보 셋팅
  576. *
  577. * @param :
  578. * @return :
  579. * @author : HIT EMR Team
  580. * @---------------------------------------------------
  581. */
  582. function fSetPrntCancel(){
  583. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  584. var listPath = "/root/main/prntstat/list";
  585. var targetPath="/root/maintemp/prntstat/list";
  586. var currDT = getCurrentDate()+getCurrentTime();
  587. var updtresncnts = model.getValue("/root/tmp/resn");
  588. for(var irow = 1; irow <= rowcount; irow++){
  589. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  590. //20111007
  591. var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
  592. for(var i=1; i<=parseInt(chkform.length); i++){
  593. if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
  594. alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 삭제는 선택진료 신청관리 화면에서만 가능합니다.");
  595. return;
  596. }
  597. }
  598. //20111007
  599. //2013/03/08 Start
  600. if(model.getValue(listPath + "[" + irow + "]/statcd") == "CP" || model.getValue(listPath + "[" + irow + "]/statcd") == "D"){
  601. messageBox("이미 삭제된 데이터입니다", "I", "");
  602. return;
  603. }
  604. //2013/03/08 End
  605. //2013/02/22 Start 전자동의서 관련 수정 시작
  606. if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){
  607. }else if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
  608. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
  609. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
  610. messageBox("출력상태가 아닌 데이터가","E005");
  611. return;
  612. }
  613. /*if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
  614. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
  615. || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
  616. messageBox("출력상태가 아닌 데이터가","E005");
  617. return;
  618. }*/
  619. //2013/02/22 End
  620. var cnt = model.getXPathValue("count("+targetPath+")");
  621. cnt = parseInt(cnt) + 1;
  622. model.makeNode(targetPath+"["+cnt+"]");
  623. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  624. model.setValue( targetPath+"["+cnt+"]/prntdt", "");
  625. model.setValue( targetPath+"["+cnt+"]/prntdeptcd", "");
  626. model.setValue( targetPath+"["+cnt+"]/prntuserid", "");
  627. model.setValue( targetPath+"["+cnt+"]/prntdeptnm", "");
  628. model.setValue( targetPath+"["+cnt+"]/prntusernm", "");
  629. model.setValue( targetPath+"["+cnt+"]/statcd", "CP");
  630. model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
  631. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  632. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  633. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
  634. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  635. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
  636. model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
  637. //2013/02/27 Start 전자동의서 관련 플래그 체크
  638. if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){
  639. model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y");
  640. }
  641. //2013/02/27 End
  642. /*
  643. model.setValue(listPath + "[" + irow + "]/prntdt", "");
  644. model.setValue(listPath + "[" + irow + "]/prntdeptcd", "");
  645. model.setValue(listPath + "[" + irow + "]/prntuserid", "");
  646. model.setValue(listPath + "[" + irow + "]/prntdeptnm", "");
  647. model.setValue(listPath + "[" + irow + "]/prntusernm", "");
  648. model.setValue(listPath + "[" + irow + "]/statcd", "CP");
  649. model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
  650. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  651. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  652. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
  653. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  654. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
  655. }
  656. }
  657. model.refresh();
  658. fSetData();
  659. }
  660. /**
  661. * @desc : 출력 취소 정보 셋팅
  662. *
  663. * @param :
  664. * @return :
  665. * @author : HIT EMR Team
  666. * @---------------------------------------------------
  667. */
  668. function fSetDelCancel(){
  669. var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
  670. var listPath = "/root/main/prntstat/list";
  671. var targetPath="/root/maintemp/prntstat/list";
  672. var currDT = getCurrentDate()+getCurrentTime();
  673. for(var irow = 1; irow <= rowcount; irow++){
  674. if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
  675. if(model.getValue(listPath + "[" + irow + "]/statcd") != "CP" && model.getValue(listPath + "[" + irow + "]/statcd") != "D"){
  676. messageBox("삭제상태가 아닌 데이터가","E005");
  677. return;
  678. }
  679. //2013/02/27 Start 원무에서 발생하는 서식은 원무쪽 화면으로 유도
  680. var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
  681. for(var i=1; i<=parseInt(chkform.length); i++){
  682. if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
  683. alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 삭제 취소는 선택진료 신청관리 화면에서만 가능합니다.");
  684. return;
  685. }
  686. }
  687. //2013/02/27 End
  688. var cnt = model.getXPathValue("count("+targetPath+")");
  689. cnt = parseInt(cnt) + 1;
  690. model.makeNode(targetPath+"["+cnt+"]");
  691. model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
  692. model.setValue( targetPath+"["+cnt+"]/prntdt", currDT);
  693. model.setValue( targetPath+"["+cnt+"]/prntdeptcd", getUserInfo("dutplcecd"));
  694. model.setValue( targetPath+"["+cnt+"]/prntuserid", getUserInfo("userid"));
  695. model.setValue( targetPath+"["+cnt+"]/prntdeptnm", getUserInfo("dutplcenm"));
  696. model.setValue( targetPath+"["+cnt+"]/prntusernm", getUserInfo("usernm"));
  697. //2013/02/25 Start 전자동의서를 삭제취소 할시에는 반납 상태로 돌림
  698. if(model.getValue(listPath + "[" + irow + "]/eocryn") != "Y"){
  699. model.setValue( targetPath+"["+cnt+"]/statcd", "P");
  700. }else{
  701. model.setValue( targetPath+"["+cnt+"]/statcd", "C");
  702. model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y");
  703. }
  704. //2013/02/25 End
  705. model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
  706. model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
  707. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  708. model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
  709. model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  710. model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
  711. /*
  712. model.setValue(listPath + "[" + irow + "]/prntdt", currDT);
  713. model.setValue(listPath + "[" + irow + "]/prntdeptcd", getUserInfo("dutplcecd"));
  714. model.setValue(listPath + "[" + irow + "]/prntuserid", getUserInfo("userid"));
  715. model.setValue(listPath + "[" + irow + "]/prntdeptnm", getUserInfo("dutplcenm"));
  716. model.setValue(listPath + "[" + irow + "]/prntusernm", getUserInfo("usernm"));
  717. model.setValue(listPath + "[" + irow + "]/statcd", "P");
  718. model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
  719. model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
  720. model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
  721. model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
  722. model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
  723. model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
  724. }
  725. }
  726. model.refresh();
  727. fSetData();
  728. }
  729. /**
  730. * @desc : 버튼 초기화
  731. *
  732. * @param :
  733. * @return :
  734. * @author : HIT EMR Team
  735. * @---------------------------------------------------
  736. */
  737. function finitialBtn(row, checkflag){
  738. var statcd = model.getValue("/root/main/prntstat/list["+row+"]/statcd");
  739. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  740. //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
  741. var dutplcecd = getUserInfo("dutplcecd");
  742. if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
  743. // KNUH_20101207_박성호_end
  744. if(checkflag){
  745. switch(statcd){
  746. case "P":
  747. btn_rtncnfm.disabled = true;
  748. btn_rntcancel.disabled = true;
  749. btn_cnfmcancel.disabled = true;
  750. btn_delcancel.disabled = true;
  751. btn_rtn.disabled = false;
  752. btn_prntcancel.disabled = false;
  753. break;
  754. case "R":
  755. btn_rtncnfm.disabled = false;
  756. btn_rntcancel.disabled = false;
  757. btn_cnfmcancel.disabled = true;
  758. btn_delcancel.disabled = true;
  759. btn_rtn.disabled = true;
  760. btn_prntcancel.disabled = true;
  761. break;
  762. case "C":
  763. btn_rtncnfm.disabled = true;
  764. btn_rntcancel.disabled = true;
  765. btn_cnfmcancel.disabled = false;
  766. btn_delcancel.disabled = true;
  767. btn_rtn.disabled = true;
  768. btn_prntcancel.disabled = true;
  769. break;
  770. case "CP":
  771. btn_rtncnfm.disabled = true;
  772. btn_rntcancel.disabled = true;
  773. btn_cnfmcancel.disabled = true;
  774. btn_delcancel.disabled = false;
  775. btn_rtn.disabled = true;
  776. btn_prntcancel.disabled = true;
  777. break;
  778. case "CR":
  779. btn_rtncnfm.disabled = true;
  780. btn_rntcancel.disabled = true;
  781. btn_cnfmcancel.disabled = true;
  782. btn_delcancel.disabled = true;
  783. btn_rtn.disabled = false;
  784. btn_prntcancel.disabled = false;
  785. break;
  786. case "CC":
  787. btn_rtncnfm.disabled = false;
  788. btn_rntcancel.disabled = false;
  789. btn_cnfmcancel.disabled = true;
  790. btn_delcancel.disabled = true;
  791. btn_rtn.disabled = true;
  792. btn_prntcancel.disabled = true;
  793. break;
  794. }
  795. }
  796. var setflag = model.getValue("/root/main/prntstat/list["+row+"]/scanyn");
  797. if((setflag == "Y")&&((statcd == "R")||(statcd == "CC"))){
  798. btn_barcode.disabled = true;
  799. btn_rtn.disabled = true;
  800. btn_rntcancel.disabled = true;
  801. btn_cnfmcancel.disabled = true;
  802. btn_prntcancel.disabled = true;
  803. btn_delcancel.disabled = true;
  804. btn_rtncnfm.disabled = false;
  805. } else if((setflag == "Y")&&(statcd == "C")){
  806. btn_barcode.disabled = true;
  807. btn_rtn.disabled = true;
  808. btn_rntcancel.disabled = true;
  809. btn_cnfmcancel.disabled = true;
  810. btn_prntcancel.disabled = true;
  811. btn_delcancel.disabled = true;
  812. btn_rtncnfm.disabled = true;
  813. }
  814. }
  815. //2013/02/22 Start 전자동의서관련 수정
  816. /*
  817. * 전자동의서를 선택시 삭제 또는 삭제취소를 활성화 시켜준다.
  818. */
  819. var eocryn = model.getValue("/root/main/prntstat/list["+row+"]/eocryn");
  820. if(eocryn=="Y"){
  821. btn_prntcancel.disabled = false;
  822. btn_delcancel.disabled = false;
  823. }
  824. //2013/02/22 End
  825. //사유입력가능기관
  826. if (gResnablecnt > 0) {
  827. btn_rntcancel.disabled = false;
  828. }
  829. }
  830. /**
  831. * @desc : 엑셀파일로 저장
  832. *
  833. * @param :
  834. * @return :
  835. * @author : HIT EMR Team
  836. * @---------------------------------------------------
  837. */
  838. function fSaveExcel(){
  839. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  840. if (fileName != "")
  841. {
  842. grd_ocrprntlist.saveExcel(fileName, "SheetName", true, true, "", "", false);
  843. }
  844. }
  845. /**
  846. * @desc : 기록이력정보 조회
  847. *
  848. * @param :
  849. * @return :
  850. * @author : HIT EMR Team
  851. * @---------------------------------------------------
  852. */
  853. function fShowHist(){
  854. var row = grd_ocrprntlist.row;
  855. var chk_List = instance1.selectNodes("/root/main/prntstat/list[choice = 'true']");
  856. if(chk_List.length > 1){
  857. messageBox("데이타가 두 건이상", "E005");
  858. return;
  859. }
  860. if(btn_histview.label == "이력닫기"){
  861. group2.attribute("visibility") = "hidden";
  862. grd_ocrprntlist.rebuildStyle();
  863. btn_histview.attribute("text") = "이력보기"
  864. btn_histview.refresh();
  865. return;
  866. }
  867. model.makeValue("/root/send/reqdata/ocrtag", model.getValue("/root/main/prntstat/list["+row+"]/ocrtag"));
  868. model.makeValue("/root/send/reqdata/currentdd", getCurrentDate());
  869. submit("TRMRF02606");
  870. group2.attribute("visibility") = "visible";
  871. btn_histview.attribute("text") = "이력닫기"
  872. btn_histview.refresh();
  873. model.removeNodeset("/root/send/reqdata");
  874. }
  875. /**
  876. * @desc : 환자정보 조회
  877. *
  878. * @param :
  879. * @return :
  880. * @author : HIT EMR Team
  881. * @---------------------------------------------------
  882. */
  883. function fGetPatSearch(){
  884. model.makeValue("/root/temp/srchcond","1");
  885. model.makeValue("/root/temp/pid", model.getValue("/root/main/pid"));
  886. model.makeValue("/root/temp/autoflag", "Y"); // 1건인경우 자동으로닫힘
  887. modal("SPPMC02500", 1, 10, 10, "SPPMC02500", "/root/temp", "/root/send");
  888. model.setValue("/root/main/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  889. model.refresh();
  890. }
  891. /**
  892. * @desc : 데이타 선택
  893. *
  894. * @param :
  895. * @return :
  896. * @author : HIT EMR Team
  897. * @---------------------------------------------------
  898. */
  899. function fChoiceData(){
  900. var row = grd_ocrprntlist.row;
  901. var sRowCnt = grd_ocrprntlist.rows- grd_ocrprntlist.fixedRows;
  902. var allSel = grd_ocrprntlist.valueMatrix(0, 1);
  903. if(grd_ocrprntlist.isCell(event.target) && grd_ocrprntlist.mouserow >= grd_ocrprntlist.fixedrows) { //그리드에서 데이타영역만 선택
  904. if(grd_ocrprntlist.col == 1){
  905. if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "true"){
  906. model.makeValue("/root/main/prntstat/list["+row+"]/choice", "true");
  907. finitialBtn(row, model.getValue("/root/main/prntstat/list["+row+"]/choice"));
  908. }else if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "false"){
  909. model.makeValue("/root/main/prntstat/list["+row+"]/choice", "false");
  910. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  911. var dutplcecd = getUserInfo("dutplcecd");
  912. //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
  913. if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
  914. // KNUH_20101207_박성호_end
  915. btn_rtncnfm.disabled = false;
  916. btn_rntcancel.disabled = false;
  917. btn_cnfmcancel.disabled = false;
  918. btn_delcancel.disabled = false;
  919. btn_rtn.disabled = false;
  920. btn_prntcancel.disabled = false;
  921. btn_barcode.disabled = false;
  922. }
  923. }
  924. }
  925. }else if((grd_ocrprntlist.col == 1) && (grd_ocrprntlist.row == 0)) {
  926. if(allSel == "선택"){
  927. for(var iRow=1; iRow<=sRowCnt; iRow++){
  928. model.setValue("/root/main/prntstat/list["+iRow+"]/choice","true");
  929. grd_ocrprntlist.valueMatrix(0, 1) = "해제";
  930. }
  931. } else if(allSel == "해제"){
  932. for(var iRow=1; iRow<=sRowCnt; iRow++){
  933. model.setValue("/root/main/prntstat/list["+iRow+"]/choice","false");
  934. grd_ocrprntlist.valueMatrix(0, 1) = "선택";
  935. }
  936. }
  937. }
  938. }
  939. /**
  940. * @desc : 환자 정보 Get
  941. *
  942. * @param :
  943. * @return :
  944. * @author : HIT EMR Team
  945. * @---------------------------------------------------
  946. */
  947. function fGetPatInfo(){
  948. var node = getGlobalVariable("paminfo");
  949. setCSVToNode("/root/main/session/paminfo", node);
  950. model.setValue("/root/main/flag", "ORD");
  951. model.setValue("/root/main/pid", model.getValue("/root/main/session/paminfo/list/pid"));
  952. model.setValue("/root/main/dept/orddept", model.getValue("/root/main/session/paminfo/list/orddeptcd"));
  953. model.setValue("/root/main/ioflag", model.getValue("/root/main/session/paminfo/list/ordtype"));
  954. //model.setValue("/root/main/dept/prntdept", model.getValue("/root/main/session/paminfo/list/orddeptcd"));
  955. if((model.getValue("/root/main/ioflag") == "O") || (model.getValue("/root/main/ioflag") == "S")){
  956. model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/orddd"));
  957. model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/orddd"));
  958. } else if(model.getValue("/root/main/ioflag") == "I"){
  959. model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
  960. model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
  961. model.setValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
  962. } else if(model.getValue("/root/main/ioflag") == "E"){
  963. model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
  964. model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
  965. model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
  966. } else if(model.getValue("/root/main/ioflag") == "D"){
  967. model.setValue("/root/main/ioflag", "I");
  968. model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
  969. model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
  970. model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
  971. } else {
  972. model.setValue("/root/main/ioflag", "A");
  973. }
  974. fSearch();
  975. }
  976. /**
  977. * @desc : 바코드 반납 팝업
  978. *
  979. * @param :
  980. * @return :
  981. * @author : HIT EMR Team
  982. * @---------------------------------------------------
  983. */
  984. function fBarCodeRtnPopup()
  985. {
  986. modal("SPMRF02900", "", "200", "200", "SPMRF02900","","");
  987. }
  988. /**
  989. * @desc : OCR 재프린트
  990. *
  991. * @param :
  992. * @return :
  993. * @author : HIT EMR Team
  994. * @---------------------------------------------------
  995. */
  996. function fRePrntOCR(){
  997. var formtypecls = "";
  998. var ocrtagprntyn = "";
  999. var iRow = grd_ocrprntlist.row;
  1000. ivw_ocrprnt.attribute("src") = "../../../emr/formmngtweb/xrw/SSMRF03800_OCR뷰어.xrw";
  1001. var formcd = model.getValue("/root/main/prntstat/list["+ iRow + "]/formcd");
  1002. var pid = model.getValue("/root/main/prntstat/list["+ iRow + "]/pid");
  1003. var orddd = model.getValue("/root/main/prntstat/list["+ iRow + "]/orddd");
  1004. var cretno = model.getValue("/root/main/prntstat/list["+ iRow + "]/cretno");
  1005. var ordtype = model.getValue("/root/main/prntstat/list["+ iRow + "]/ioflag");
  1006. var ocrtag = model.getValue("/root/main/prntstat/list["+ iRow + "]/ocrtag");
  1007. var scanyn = model.getValue("/root/main/prntstat/list["+ iRow + "]/scanyn");
  1008. // 변경 요청번호 1851에 따른 수정
  1009. // 2009-07-24 nj
  1010. if(scanyn == 'Y'){
  1011. messageBox("스캔완료된 서식은 재출력 할 수", "I004");
  1012. return;
  1013. }
  1014. model.removeNodeset("/root/send/reqdata");
  1015. model.makeValue("/root/send/reqdata/ocrtag", ocrtag);
  1016. /* var returnVal = fGetHardCDList("Y", 199, 3);dnpq
  1017. //유전자검사 동의서 재출력(2011.12.08 lyj)
  1018. if ( formcd == returnVal ) */
  1019. if( fContainsHardCD("199", formcd))
  1020. {
  1021. ivw_ocrprnt.window.javascript.fGenePrint(ocrtag,ordtype,formcd);
  1022. return;
  1023. }
  1024. if(submit("TRMRF02605")){
  1025. formtypecls = model.getValue("/root/main/ocrforminfo/formtypecls");
  1026. ocrtagprntyn = model.getValue("/root/main/ocrforminfo/ocrtagprntyn");
  1027. ivw_ocrprnt.window.javascript.fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag);
  1028. ivw_ocrprnt.window.javascript.fPrint("A");
  1029. }
  1030. }
  1031. /**
  1032. * @desc : OCR 프린트
  1033. *
  1034. * @param :
  1035. * @return :
  1036. * @author : HIT EMR Team
  1037. * @---------------------------------------------------
  1038. */
  1039. function fOcrprnt(){
  1040. if(isDataCell()){
  1041. var state = grd_ocrprntlist.valueMatrix(grd_ocrprntlist.mouserow, grd_ocrprntlist.colRef("statcd"));
  1042. //상태가 삭제인 경우만 제외하고 재출력이 가능하도록 수정
  1043. if ( state != "CP" && state != "D" )
  1044. setPopupMenu("grd_ocrprntlist", false, "/root/init/mouserght", "label", "value");
  1045. } else {
  1046. initPopupMenu();
  1047. }
  1048. }
  1049. /**
  1050. * @desc : 신생아지문표 반납은 신생아 정보로 정보 수정이 되어야 함
  1051. *
  1052. * @param : ocrtag
  1053. * @return :
  1054. * @author : HIT EMR Team
  1055. * @---------------------------------------------------
  1056. */
  1057. function fGetNewBabyInfo(listPath, irow){
  1058. var targetPath="/root/maintemp/prntstat/list";
  1059. var pid = model.getValue(listPath + "[" + irow + "]/pid");
  1060. var cretno = model.getValue(listPath + "[" + irow + "]/cretno");
  1061. var orddd = model.getValue(listPath + "[" + irow + "]/orddd");
  1062. model.removeNodeset("/root/send/reqdata");
  1063. model.makeValue("/root/send/reqdata/pid", pid);
  1064. model.makeValue("/root/send/reqdata/cretno", cretno);
  1065. model.makeValue("/root/send/reqdata/indd", orddd);
  1066. if(submit("TRMRF02501")){
  1067. var nodeCnt = getNodesetCount("/root/main/newbabylist/newbabyinfo");
  1068. if(nodeCnt == 0){
  1069. messageBox("등록된 신생아가 존재하지 않습니다", "");
  1070. return;
  1071. } else if(nodeCnt > 1){
  1072. setParameter("SPMRF02500_pid", pid);
  1073. setParameter("SPMRF02500_indd", orddd);
  1074. setParameter("SPMRF02500_cretno", cretno);
  1075. setParameter("SPMRF02500_rtnPath", "/root/hidden/param/newbabyinfo");
  1076. modal("SPMRF02500");
  1077. /*
  1078. model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno"));
  1079. model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm"));
  1080. model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd"));
  1081. model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno"));
  1082. model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd"));
  1083. model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid"));
  1084. model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm"));
  1085. model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm"));*/
  1086. model.setValue( targetPath + "/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno"));
  1087. model.setValue( targetPath + "/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm"));
  1088. model.setValue( targetPath + "/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd"));
  1089. model.setValue( targetPath + "/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno"));
  1090. model.setValue( targetPath + "/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd"));
  1091. model.setValue( targetPath + "/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid"));
  1092. model.setValue( targetPath + "/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm"));
  1093. model.setValue( targetPath + "/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm"));
  1094. model.resetInstanceNode("/root/hidden/param/newbabyinfo");
  1095. } else {
  1096. /*
  1097. model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno"));
  1098. model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm"));
  1099. model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd"));
  1100. model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno"));
  1101. model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd"));
  1102. model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid"));
  1103. model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm"));
  1104. model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,")); */
  1105. model.setValue( targetPath + "/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno"));
  1106. model.setValue( targetPath + "/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm"));
  1107. model.setValue( targetPath + "/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd"));
  1108. model.setValue( targetPath + "/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno"));
  1109. model.setValue( targetPath + "/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd"));
  1110. model.setValue( targetPath + "/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid"));
  1111. model.setValue( targetPath + "/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm"));
  1112. model.setValue( targetPath + "/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,"));
  1113. model.resetInstanceNode("/root/main/newbabylist/newbabyinfo");
  1114. }
  1115. }
  1116. }
  1117. /**
  1118. * @desc : 퇴원환자에 대한 OCR서식을 조회하기 위한 값 설정
  1119. *
  1120. * @param :
  1121. * @return :
  1122. * @author : 나종천
  1123. * @---------------------------------------------------
  1124. */
  1125. function fDschSrchSetting(){
  1126. chk_state2.disabled = false;
  1127. chk_state3.disabled = false;
  1128. chk_state4.disabled = false;
  1129. chk_state5.disabled = false;
  1130. model.setValue("/root/main/flag", "DSCH");
  1131. model.setValue("/root/main/ioflag", "I");
  1132. model.setValue("/root/main/term/termfromdd", getCurrentDate());
  1133. model.setValue("/root/main/term/termtodd", getCurrentDate());
  1134. model.setValue("/root/main/rtncnfm", "P|CD|CR");
  1135. model.refresh();
  1136. }
  1137. /**
  1138. * @desc : 출남부서 조회
  1139. *
  1140. * @param :
  1141. * @return :
  1142. * @author : 주희경
  1143. * @---------------------------------------------------
  1144. */
  1145. function fGetDeptSearch( targetDept ){
  1146. var supdeptcolumn = ""; // "homecaresupdeptcd";
  1147. var searchcondition = "deptnm";
  1148. var searchterm = model.getValue("/root/temp/dept/"+targetDept+"/depthngnm");
  1149. var receivedeptcdpath = "/root/main/dept/"+targetDept;
  1150. var receivedeptnmpath = "/root/temp/dept/"+targetDept+"/depthngnm";
  1151. var instcd = getUserInfo("dutplceinstcd");
  1152. zbcfGetDeptCodeListFromTree(searchcondition, searchterm, instcd, supdeptcolumn, receivedeptcdpath, receivedeptnmpath);
  1153. }
  1154. /**
  1155. * @desc : 조회 텍스트가 없을 때 출남부서 value 초기화
  1156. *
  1157. * @param :
  1158. * @return :
  1159. * @author : 주희경
  1160. * @---------------------------------------------------
  1161. */
  1162. function fSetDeptValue()
  1163. {
  1164. var prntdept = model.getValue("/root/temp/dept/prntdept/depthngnm");
  1165. var rtndept = model.getValue("/root/temp/dept/rtndept/depthngnm");
  1166. if (prntdept == "")
  1167. {
  1168. model.setValue("/root/main/dept/prntdept", "");
  1169. }
  1170. if (rtndept == "")
  1171. {
  1172. model.setValue("/root/main/dept/rtndept", "");
  1173. }
  1174. }
  1175. /* 테스트 OCR 출력용 인터페이스-이윤주 */
  1176. function fPerPrntOCR()
  1177. {
  1178. var formcd = "1100011224";
  1179. var pid = "93888";
  1180. var orddd = "20120227";
  1181. var cretno = "1";
  1182. var ordtype = "O";
  1183. setParameter ("formcd", formcd );
  1184. setParameter ("pid", pid);
  1185. setParameter ("orddd", orddd );
  1186. setParameter ("cretno", cretno);
  1187. setParameter ("ordtype", ordtype );
  1188. modal ("SSMRF03700");
  1189. }