1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792 |
- /**
- * @desc : 초기셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- var _preass = "N"; //진정전 환자 평가서 화면 로딩 여부
- function fInitialize(){
-
- // ocr 받을 리스트 처리(20140623)
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/tabview", 5973);
- var iexNodeCnt = getNodesetCnt(model, "/root/tabview/hardcd[hardcd = '" + getUserInfo("dutplcecd") + "']");
- btn_neededlist.attribute("visibility") = "hidden";
- if(iexNodeCnt > 0) {
- btn_neededlist.attribute("visibility") = "visible";
- }
-
-
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(-1, "M");
- model.removeNode("/root/hidden/topinfo/exist");
- fGetParaInfo();
- if(model.getValue("/root/main/ordinfo/pid") == ""){
- fGetTopInfo();
- }
-
- if (fContainsHardCD(5811, "Y") == true ) {
- btn_ecntform.attribute("visibility") = "visible" ;
- }else{
- btn_ecntform.attribute("visibility") = "hidden" ;
- }
-
- model.setValue("/root/main/trgtmanlist/out/orddd", getCurrentDate());
- model.setValue("/root/main/trgtmanlist/in/orddd", getCurrentDate());
- model.setValue("/root/main/ordinfo/fromdd", getCurrentDate());
- model.setValue("/root/main/trgtmanlist/er/orddd", getCurrentDate());
- model.setValue("/root/main/trgtmanlist/schpat/orddd", getCurrentDate());
- model.setValue("/root/main/ocrprntlist/fromdd", fromdd.getDateFormat());
- model.setValue("/root/main/ocrprntlist/todd", getCurrentDate());
-
- swt_trgtmanlist.selectedIndex = 0;
-
- // 20100309 한재상 수정 - 유전자검사동의서 재출력
- makeReportPreview(0, 0, 10, 10, "grp_report");
-
- // 수술 추가(20090120)
- //=======================================================
- model.setValue("/root/main/trgtmanlist/op/opcnfmdd", getCurrentDate());
-
- reqHardCodeInfo("/root/send/reqdata", "/root/init/hardcdno", 18); //마취통증의학과 부서코드 조회
- var anstdeptcd = model.getValue("/root/init/hardcdno/hardcd/hardcd");
-
- reqOpRoomList(model.getValue("/root/main/trgtmanlist/op/opcnfmdd"), "/root/init/oproomlist", "total"); //수술방명 조회
- addComboInstance("/root/init/oproomlist", "oproomcd^oproomnm", "0000^방없음", "oproomlist"); //수술방콤보 Item '방없음'추가
-
- copyNodeType("/root/init/oproomlist2", "/root/init/oproomlist", "replace");
- addComboInstance("/root/init/oproomlist2", "oproomcd^oproomnm", "-^전체", "oproomlist"); //조회조건 수술방콤보 Item '전체'추가
- //cmb_oproomcd.select(0); //수술방 콤보는 default '전체'설정
-
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept" , "D"); //부서콤보 조회
- addComboInstance("/root/init/orddept", "deptcd^depthngnm", "-^전체", "dept"); //부서콤보 Item '전체'추가
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330"); //의사콤보 조회
- addComboInstance("/root/init/userlist", "userid^usernm", "-^전체", "usercombo"); //의사콤보 Item '전체'추가
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist2" , anstdeptcd, "0330"); //마취통증의학과 의사콤보 조회
-
- if(cmb_orddept.label==""){cmb_orddept.select(0);}
- if(cmb_orddrid.label==""){cmb_orddrid.select(0);}
- //=======================================================
- //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/main/common", "depthngnm", "asc");
- zsdfGetOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/main/common", "depthngnm", "asc");
- copyNodeset("/root/main/trgtmanlist/out/dept", "/root/main/common/dept");
- //copyNodeset("/root/main/trgtmanlist/in/dept", "/root/main/common/dept");
- //copyNodeset("/root/main/trgtmanlist/er/dept", "/root/main/common/dept");
- //copyNodeset("/root/main/trgtmanlist/scshpat/dept", "/root/main/common/dept");
- //model.removeNodeset("/root/main/common/dept");
- //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/main/common", "depthngnm", "asc");
- //copyNodeset("/root/init/ocrsch/dept", "/root/main/common/dept", "replace");
-
- zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "W", "/root/main/ward", "depthngnm", "asc");
- copyNodeset("/root/main/trgtmanlist/in/wardlist", "/root/main/ward/dept");
- reqGetDrList1("/root/send/reqdata" , "/root/main/common/drlist" , getUserInfo("dutplcecd"), "total"); //의사리스트 combo조회
-
- //fReqSectionInfo(); //기본구역 정보 조회
- //addComboInstance("/root/main/common", "cdid^cdnm", "-^전체", "usercombo");
- //addParameter("cdgrupid", "M0062");
- //submit("TRMRF02304", "false",getParameterPath(), "/root/main/common/ordflag");
- zbcfGetCodeList(new Array("M0062", "M0017"), new Array("/root/main/common", "/root/init/M0017"));
- copyNodeset("/root/main/trgtmanlist/out/ordflag", "/root/main/common/M0062");
- addComboItem("cmb_ordflag", "전체", "-", "above");
- submit("TRMRF02307");
- addComboItem("cmb_formcls", "전체", "-", "above");
- zbcfGetCodeList(new Array("M0259"), new Array("/root/main/common"));
- copyNodeset("/root/main/ocrsch/formbizcls", "/root/main/common/M0259");
-
- iviewer1.window.document.body.attribute("width") = iviewer1.attribute("width");
- /*
- 2013/02/15 소스 머지 시작(주석)
- iviewer1.window.document.controls("obj_BCP").attribute("width") = "470px";
- iviewer1.window.document.body.attribute("height") = iviewer1.attribute("height");
- iviewer1.window.document.controls("obj_BCP").attribute("height") = iviewer1.attribute("height");
- iviewer1.window.document.controls("ipt_diagnm").attribute("width") = "230px";
- iviewer1.window.document.controls("grp_cnrlbox").attribute("width") = "468px";
- 2013/02/15 소스 머지 끝
- */
- //2013/02/15 소스머지 시작(추가)
- //iviewer1.window.document.controls("obj_BCP").attribute("width") = "470px";
- iviewer1.window.document.body.attribute("height") = iviewer1.attribute("height");
- //iviewer1.window.document.controls("obj_BCP").attribute("height") = iviewer1.attribute("height");
- iviewer1.window.document.controls("ipt_diagnm").attribute("width") = "230px";
- iviewer1.window.document.controls("grp_cnrlbox").attribute("width") = "468px";
-
- iviewer1.window.document.controls("f_View").attribute("width") = "470px";
- iviewer1.window.document.controls("f_View").attribute("height") = iviewer1.attribute("height");
- //2013/02/15 소스머지 끝
-
- // 의사(0330), 치과의사(0332), 사제(0110)
- if((getUserInfo("jobkindcd") == "0330") || (getUserInfo("jobkindcd") == "0332")){
- model.setValue("/root/main/ocrsch/ocrflag", "468");
- model.setValue("/root/main/ocrsch/formbizcls", "02");
- //model.setValue("/root/main/ocrsch/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- model.setValue("/root/main/ocrsch/dept", getUserInfo("dutplcecd"));
-
- model.setValue("/root/main/trgtmanlist/out/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- } else if(getUserInfo("jobkindcd") == "1110"){
- model.setValue("/root/main/ocrsch/ocrflag", "468");
- model.setValue("/root/main/ocrsch/formbizcls", "03");
- //model.setValue("/root/main/ocrsch/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- model.setValue("/root/main/ocrsch/dept", getUserInfo("dutplcecd"));
- model.setValue("/root/main/trgtmanlist/out/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- } else {
- model.setValue("/root/main/ocrsch/ocrflag", "468");
- cmb_formbizcls.select(0);
- if(model.getValue("/root/temp/para/orddeptcd") == ""){
- model.setValue("/root/main/ocrsch/dept", "-");
- } else {
- model.setValue("/root/main/ocrsch/formbizcls", "02");
- //model.setValue("/root/main/ocrsch/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- model.setValue("/root/main/ocrsch/dept", getUserInfo("dutplcecd"));
- model.setValue("/root/main/trgtmanlist/out/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
- }
- }
- fChngSrchCond("/root/main/trgtmanlist/out/dept","/root/main/trgtmanlist/out/drlist", "total");
- cmb_ordflag.select(0);
- cmb_orddept2.value = "-";
- fOcrTreeSrch();
- fSetFormDisplay();
- fGetFavorList();
- fGetRgstDeptCD();
- addComboItem("cmb_ocrdept", "전체", "-", "above");
- addComboItem("cmb_orddept1", "전체", "-", "above");
-
- // 2012/12/04 Start
- model.setValue("/root/main/trgtmanlist/out/dept", getUserInfo("dutplcecd"));
- model.setValue("/root/main/trgtmanlist/out/ioflag", "O");
- // 2012/12/04 End
-
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/tabview", 5973);
- var iexNodeCnt = getNodesetCnt(model, "/root/tabview/hardcd[hardcd = '" + getUserInfo("dutplcecd") + "']");
- btn_neededlist.attribute("visibility") = "hidden";
- if(iexNodeCnt > 0) {
- btn_neededlist.attribute("visibility") = "visible";
- }
-
- btn_ocrform.dispatch("DOMActivate");
- btn_ocrform.selected = true;
- swt_ocrinfoflag.selectedindex = 0;
-
- model.refresh();
- }
- /**
- * @desc : 환자 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetTopInfo(){
- var paminfo;
- var paminfocnt = 0;
- var paminfoflag;
- var paminfotag;
- var paminfovalue;
- var sexinfo;
- var ageinfo;
-
- paminfo = getGlobalVariable("paminfo");
- if(paminfo.length > 0){
- paminfoflag = paminfo.split("▩");
- paminfotag = paminfoflag[0].split("▦");
- paminfovalue = paminfoflag[1].split("▦");
- while(paminfocnt < paminfotag.length){
- switch(paminfotag[paminfocnt])
- {
- case "pid":
- model.setValue("/root/main/ordinfo/pid", paminfovalue[paminfocnt]);
- break;
- case "orddd":
- model.setValue("/root/main/ordinfo/orddd", paminfovalue[paminfocnt]);
- break;
- case "indd":
- model.setValue("/root/main/ordinfo/orddd", paminfovalue[paminfocnt]);
- break;
- case "orddeptcd":
- model.setValue("/root/main/ordinfo/orddeptcd", paminfovalue[paminfocnt]);
- break;
- case "orddrid":
- model.setValue("/root/main/ordinfo/drid", paminfovalue[paminfocnt]);
- break;
- case "medispclid":
- model.setValue("/root/main/ordinfo/drid", paminfovalue[paminfocnt]);
- break;
- case "ioflag":
- model.setValue("/root/main/ordinfo/ordtype", paminfovalue[paminfocnt]);
- break;
- case "hngnm":
- model.setValue("/root/main/ordinfo/patnm", paminfovalue[paminfocnt]);
- break;
- case "roomcd":
- model.setValue("/root/main/ordinfo/inroomcd", paminfovalue[paminfocnt]);
- break;
- case "cretno":
- model.setValue("/root/main/ordinfo/cretno", paminfovalue[paminfocnt]);
- break;
- case "age":
- ageinfo = paminfovalue[paminfocnt];
- break;
- case "sex":
- sexinfo = paminfovalue[paminfocnt];
- break;
- case "rrgstno1":
- model.setValue("/root/main/ordinfo/rrgstno", paminfovalue[paminfocnt]);
- break;
- }
- paminfocnt++;
- }
- model.makeValue("/root/hidden/topinfo/exist", "Y");
- }
-
-
- model.removeNodeset("/root/send/cond");
- model.makeValue("/root/send/cond/pid", model.getValue("/root/main/ordinfo/pid"));
- submit("TRMRF02314");
- var rrgstno2 = "";
-
- if (model.instances(0).selectNodes("/root/temp/patinfo/patlist/pid").length > 0)
- {
- var rrgstno2 = model.getValue("/root/temp/patinfo/patlist/rrgstno2");
- }
- // 임시로 주석처리함(추후 상단에 환자정보를 가져올시 다시 반영할 예정임(2009.02.14)
- //var rrgstno2 = getPatientInfo("regstno");
- if (isNull(rrgstno2) == true)
- {
- var rrgstno = model.getValue("/root/main/ordinfo/rrgstno");
- //alert(rrgstno2);
- }
- else
- {
- var rrgstno = model.getValue("/root/main/ordinfo/rrgstno") + "-" + rrgstno2.substring(0, 1) + "XXXXXX";
- }
-
- //alert(rrgstno);
- model.setValue("/root/main/ordinfo/rrgstno", rrgstno);
-
- /*
- if(sexinfo == "M"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-1XXXXXX");
- } else if(sexinfo =="F") {
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-2XXXXXX");
- }
- */
-
- model.setValue("/root/main/ordinfo/sa", sexinfo + "/" + ageinfo);
- model.setValue("/root/main/ordinfo/orddeptnm", getPatientInfo("orddept"));
- model.setValue("/root/main/ordinfo/drnm", getPatientInfo("apntdr"));
-
- model.setValue("/root/main/ordinfo/centcd", getPatientInfoDetail("centcd"));
- model.setValue("/root/main/ordinfo/centnm", getPatientInfoDetail("centnm"));
-
- }
- /**
- * @desc : 의사 정보 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function reqGetDrList1(ref, rsltRef, orddeptcd, queryflag, drflag){
- model.makeValue(ref + "/orddeptcd" , orddeptcd);
- model.makeValue(ref + "/queryflag" , queryflag);
- model.makeValue(ref + "/stflag" , drflag);
- submit("TRMRF02303", true, ref, rsltRef);
- }
- /**
- * @desc : 조회 조건 변경
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fChngSrchCond(deptref, drref, drflag){
- model.removeNodeset("/root/send/reqdata");
- model.refresh();
- var sDutplceCD = model.getValue(deptref);
- reqGetDrList1("/root/send/reqdata", "/root/main/common/drlist", sDutplceCD, "total", drflag);
- copyNodeset(drref, "/root/main/common/drlist");
- var sLoginID = getUserInfo("userid");
- var sDrID = model.getValue("/root/main/common/drlist[drid='"+ sLoginID + "']/drid");
- if(sDrID != ""){
- model.setValue(drref, sDrID);
- }else{
- model.setValue(drref, "-");
- }
- model.refresh();
- }
- /**
- * @desc : 외래환자 조회 요청
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fReqOutPatList(){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmanlist/out/pid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/trgtmanlist/out/orddd"));
- model.makeValue("/root/send/reqdata/ordflag", model.getValue("/root/main/trgtmanlist/out/ordflag"));
- model.makeValue("/root/send/reqdata/orddept", model.getValue("/root/main/trgtmanlist/out/dept"));
- model.makeValue("/root/send/reqdata/drlist", model.getValue("/root/main/trgtmanlist/out/drlist"));
- // Edited by 나종천 2008-07-14
- // 물리치료과인지 판단
- if((model.getValue("/root/main/trgtmanlist/out/dept") == "2010700000") || (model.getValue("/root/main/trgtmanlist/out/dept") == "2220000000")){
- model.makeValue("/root/send/reqdata/deptflag", "-");
- } else {
- model.makeValue("/root/send/reqdata/deptflag", "0");
- }
-
- //2012/12/04 Start
- model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/main/trgtmanlist/out/ioflag"));
- //2012/12/04 End
- submit("TRMRF02305");
- }
- /**
- * @desc : 입원환자 조회 요청
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fReqInPatList(){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmanlist/in/pid"));
- model.makeValue("/root/send/reqdata/srchdd", model.getValue("/root/main/trgtmanlist/in/orddd"));
- model.makeValue("/root/send/reqdata/wardlist", model.getValue("/root/main/trgtmanlist/in/wardlist"));
- model.makeValue("/root/send/reqdata/dschyn", model.getValue("/root/main/trgtmanlist/in/dschyn"));
- model.makeValue("/root/send/reqdata/orddept", model.getValue("/root/main/trgtmanlist/in/dept"));
- model.makeValue("/root/send/reqdata/drlist", model.getValue("/root/main/trgtmanlist/in/drlist"));
- submit("TRMRF02306");
- model.refresh();
- }
- /**
- * @desc : 응급환자 조회 요청
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fReqErPatList(){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmanlist/er/pid"));
- model.makeValue("/root/send/reqdata/srchdd", model.getValue("/root/main/trgtmanlist/er/orddd"));
- model.makeValue("/root/send/reqdata/srchflag", model.getValue("/root/main/trgtmanlist/er/erflag"));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/trgtmanlist/er/dept"));
- model.makeValue("/root/send/reqdata/orddrid", model.getValue("/root/main/trgtmanlist/er/drlist"));
- model.makeValue("/root/send/reqdata/section", "-");
- submit("TRMRF02310");
- model.refresh();
- }
- /**
- * @desc : 환자리스트 조회 요청
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fReqSchPatList(){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmanlist/schpat/srchpid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/trgtmanlist/schpat/orddd"));
- model.makeValue("/root/send/reqdata/sflag", model.getValue("/root/main/trgtmanlist/schpat/sflag"));
- model.makeValue("/root/send/reqdata/ordflag", model.getValue("/root/main/trgtmanlist/schpat/ordflag"));
- model.makeValue("/root/send/reqdata/orddept", model.getValue("/root/main/trgtmanlist/schpat/dept"));
- model.makeValue("/root/send/reqdata/orddrid", model.getValue("/root/main/trgtmanlist/schpat/drlist"));
- switch(model.getValue("/root/main/trgtmanlist/schpat/ordflag")){
- case 'O':
- if((model.getValue("/root/main/trgtmanlist/schpat/dept") == "2010700000") || (model.getValue("/root/main/trgtmanlist/schpat/dept") == "2220000000")){
- model.makeValue("/root/send/reqdata/deptflag", "-");
- } else {
- model.makeValue("/root/send/reqdata/deptflag", "0");
- }
- break;
- }
- submit("TRMRF02311");
- model.refresh();
- }
- /**
- * @desc : 수술환자리스트 조회
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fReqOPPatList(){
- //마취통증의학과와 조회진료과가 동일한 경우는 전체 조회 처리
- //서버로직으로의 처리는 속도영향이 있음으로 web에서 처리
- //2008. 07. 29. 오지훈
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- var anstpaindeptcd = model.getValue("/root/init/hardcdno/hardcd/hardcd");
- if(anstpaindeptcd == model.getValue("/root/main/cond/perfdeptcd")){
- model.setValue("/root/send/reqdata/perfdeptcd", "-"); //집도과 전체설정
- model.setValue("/root/send/reqdata/perfdrid" , "-"); //집도의 전체설정
- }
-
- /*
- var orderby = model.getValue("/root/main/cond/orderby");
- var sortcol = model.getValue("/root/main/cond/sortcol");
- if(sortcol != "" && orderby != ""){
- sORDERBY = orderby;
- //nodeListSort(grd_oppatlist.nodeset, grd_oppatlist.colAttribute(sortcol, "ref"), sORDERBY);
- grd_oppatlist.colsort(sortcol) = sORDERBY
- grd_oppatlist.sort(1, 1, grd_oppatlist.rows -1, grd_oppatlist.cols -1) = "usersort";
- grd_oppatlist.gridToInstance();
- grd_oppatlist.refresh();
- }
- */
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmanlist/op/pid"));
- model.makeValue("/root/send/reqdata/opcnfmdd", model.getValue("/root/main/trgtmanlist/op/opcnfmdd"));
- model.makeValue("/root/send/reqdata/perfdeptcd", model.getValue("/root/main/trgtmanlist/op/perfdeptcd"));
- model.makeValue("/root/send/reqdata/perfdrid", model.getValue("/root/main/trgtmanlist/op/perfdrid"));
- model.makeValue("/root/send/reqdata/opstatcd", model.getValue("/root/main/trgtmanlist/op/opstatcd"));
- submit("TRMRF02313");
- model.refresh();
-
-
- }
- /**
- * @desc : 환자 선택
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSelectPat(pCtrl){
- var ctrlObj = document.controls(pCtrl);
- var currRow = ctrlObj.Row;
- var sexflag;
-
- //alert(swt_trgtmanlist.selectedIndex);
-
- switch(swt_trgtmanlist.selectedIndex){
- case 0:
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/patnm"));
- model.setValue("/root/main/ordinfo/orddd",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/orddd"));
- model.setValue("/root/main/ordinfo/orddeptnm", ctrlObj.labelMatrix(currRow,ctrlObj.colRef("orddeptcd")));
- model.setValue("/root/main/ordinfo/drid",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/drid"));
- model.setValue("/root/main/ordinfo/drnm",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/drnm"));
- model.setValue("/root/main/ordinfo/sa",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/rrgstno"));
- model.setValue("/root/main/ordinfo/centcd",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/centcd"));
- model.setValue("/root/main/ordinfo/centnm",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/centnm"));
- model.setValue("/root/main/ordinfo/centengabbr",model.getValue("/root/main/trgtmanlist/out/opat/list["+currRow + "]/centengabbr"));
-
- break;
- case 1:
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm",model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/patnm"));
- model.setValue("/root/main/ordinfo/orddd",model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/indd"));
- model.setValue("/root/main/ordinfo/orddeptnm", ctrlObj.labelMatrix(currRow,ctrlObj.colRef("orddeptcd")));
- model.setValue("/root/main/ordinfo/drid", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/medispclid"));
- model.setValue("/root/main/ordinfo/drnm", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/medispclnm"));
- model.setValue("/root/main/ordinfo/inroomcd", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/roomcd"));
- model.setValue("/root/main/ordinfo/sa", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/trgtmanlist/in/ipat/list["+currRow + "]/rrgstno"));
- model.setValue("/root/main/ordinfo/centcd", "");
- model.setValue("/root/main/ordinfo/centnm", "");
- model.setValue("/root/main/ordinfo/centengabbr", "");
-
- break;
- case 2:
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm",model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/patnm"));
- model.setValue("/root/main/ordinfo/orddd",model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/indd"));
- model.setValue("/root/main/ordinfo/orddeptnm", ctrlObj.labelMatrix(currRow,ctrlObj.colRef("orddeptcd")));
- model.setValue("/root/main/ordinfo/drid", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/drid"));
- model.setValue("/root/main/ordinfo/drnm", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/drnm"));
- model.setValue("/root/main/ordinfo/sa", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/trgtmanlist/er/erpat/list["+currRow + "]/rrgstno"));
- model.setValue("/root/main/ordinfo/centcd", "");
- model.setValue("/root/main/ordinfo/centnm", "");
- model.setValue("/root/main/ordinfo/centengabbr", "");
-
- break;
- case 3:
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/hngnm"));
- model.setValue("/root/main/ordinfo/orddd", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/orddd"));
- model.setValue("/root/main/ordinfo/orddeptnm", ctrlObj.labelMatrix(currRow,ctrlObj.colRef("orddeptcd")));
- model.setValue("/root/main/ordinfo/drid", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/orddrid"));
- model.setValue("/root/main/ordinfo/drnm", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/orddrnm"));
- model.setValue("/root/main/ordinfo/inroomcd", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/roomcd"));
- model.setValue("/root/main/ordinfo/sa", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/rrgstno"));
- model.setValue("/root/main/ordinfo/centcd", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/centcd"));
- model.setValue("/root/main/ordinfo/centnm", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/centnm"));
- model.setValue("/root/main/ordinfo/centengabbr", model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+currRow + "]/centengabbr"));
-
- break;
- case 4:
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm",model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/hngnm"));
- model.setValue("/root/main/ordinfo/orddd",model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/indd"));
- model.setValue("/root/main/ordinfo/orddeptnm", ctrlObj.labelMatrix(currRow,ctrlObj.colRef("orddeptcd")));
- model.setValue("/root/main/ordinfo/drid", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/perfdrid"));
- model.setValue("/root/main/ordinfo/drnm", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/perfdrnm"));
- model.setValue("/root/main/ordinfo/inroomcd", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/roomcd"));
- model.setValue("/root/main/ordinfo/sa", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/trgtmanlist/op/oppat/list["+currRow + "]/rrgstno"));
- model.setValue("/root/main/ordinfo/centcd", "");
- model.setValue("/root/main/ordinfo/centnm", "");
- model.setValue("/root/main/ordinfo/centengabbr", "");
-
- break;
- }
-
- model.setValue("/root/main/ocrsch/dept", model.getValue("/root/main/ordinfo/orddeptcd"));
-
- sexflag = model.getValue("/root/main/ordinfo/sa");
-
- var rrgstno = model.getValue("/root/main/ordinfo/rrgstno").substring(0, 8) + "XXXXXX";
- model.setValue("/root/main/ordinfo/rrgstno", rrgstno);
- /*
- if(sexflag.substring(0, 1) == "M"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-1XXXXXX");
- } else if(sexflag.substring(0,1) == "F"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-2XXXXXX");
- }
- */
- model.refresh();
- }
- /**
- * @desc : OCR 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSearchOcr(flag){
- if(flag == "F"){
- var selNode = instance1.selectSingleNode("/root/main/favorlist/list[formcd=" + model.getValue("/root/main/selform") + "]");
- var formtypecls = instance1.selectSingleNode("/root/main/favorlist/list[formcd=" + model.getValue("/root/main/selform") + "]/formtypecls");
- var ocrtagprntyn = instance1.selectSingleNode("/root/main/favorlist/list[formcd=" + model.getValue("/root/main/selform") + "]/ocrtagprntyn");
- if((model.getValue("/root/main/ordinfo/pid") == null) || (model.getValue("/root/main/ordinfo/pid") == "")){
- messageBox("환자를", "C002");
- return;
- } else{
- if((model.getValue("/root/main/selform") != '')){
- model.setValue("/root/main/ordinfo/formcd", model.getValue("/root/main/selform"));
- iviewer1.window.javascript.fGetOCRInfo(model.getValue("/root/main/selform"), null, null, null, null, formtypecls.text, ocrtagprntyn.text);
- } else {
- messageBox("서식을", "C002");
- return;
- }
- }
- } else {
- var selNode = instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[formcd=" + model.getValue("/root/main/selform") + "]");
- var formtypecls = instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[formcd=" + model.getValue("/root/main/selform") + "]/formtypecls");
- var ocrtagprntyn = instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[formcd=" + model.getValue("/root/main/selform") + "]/ocrtagprntyn");
-
- //검색 탭에서 찾기
- if (formtypecls == null || formtypecls.text == "")
- {
- formtypecls = instance1.selectSingleNode("/root/main/formlist[formcd=" + model.getValue("/root/main/selform") + "]/formtypecls");
- }
-
- if (ocrtagprntyn == null || ocrtagprntyn.text == "")
- {
- ocrtagprntyn = instance1.selectSingleNode("/root/main/formlist[formcd=" + model.getValue("/root/main/selform") + "]/ocrtagprntyn");
- }
-
- //비었을 경우 즐겨찾기에서 찾기
- if (formtypecls == null || formtypecls.text == "")
- {
- formtypecls = instance1.selectSingleNode("/root/main/favorlist/list[formcd=" + model.getValue("/root/main/selform") + "]/formtypecls");
- }
-
- if (ocrtagprntyn == null || ocrtagprntyn.text == "")
- {
- ocrtagprntyn = instance1.selectSingleNode("/root/main/favorlist/list[formcd=" + model.getValue("/root/main/selform") + "]/ocrtagprntyn");
- }
-
- if((model.getValue("/root/main/ordinfo/pid") == null) || (model.getValue("/root/main/ordinfo/pid") == "")){
- messageBox("환자를", "C002");
- return;
- } else{
- if((model.getValue("/root/main/selform") != '')){
- //20110725
- if (model.getValue("/root/main/jinjeong/jinjeonginfo/printyn")=="Y"){
- model.setValue("/root/main/ordinfo/formcd", model.getValue("/root/main/selform"));
- iviewer1.window.javascript.fGetOCRInfo(model.getValue("/root/main/selform"), null, null, null, null, model.getValue("/root/main/jinjeongcode/jinjeongcdinfo/formtypecls"), model.getValue("/root/main/jinjeongcode/jinjeongcdinfo/ocrtagprntyn"));
- //20110725
- }else{
- model.setValue("/root/main/ordinfo/formcd", model.getValue("/root/main/selform"));
- iviewer1.window.javascript.fGetOCRInfo(model.getValue("/root/main/selform"), null, null, null, null, formtypecls.text, ocrtagprntyn.text);
- }
- //iviewer1.window.javascript.fGetOCRInfo(model.getValue("/root/main/selform"), "00036823", "20070504","1","O");
- } else {
- messageBox("서식을", "C002");
- return;
- }
- }
- }
- }
- /**
- * @desc : 이미지 인쇄
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fPrintImage(prntflag)
- {
-
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/ordinfo/pid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/ordinfo/orddd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/ordinfo/cretno"));
- model.makeValue("/root/send/reqdata/ordtype", model.getValue("/root/main/ordinfo/ordtype"));
- model.makeValue("/root/send/reqdata/formcd", model.getValue("/root/main/ordinfo/formcd"));
-
-
- //사본발행 및 진단서 가접수 동의서 출력여부 확인 -20150216 이윤주
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/prnt", 5989);
- var prntcnt = getNodesetCnt(model, "/root/init/prnt/hardcd[hardcd = 'Y']");
-
- if (prntcnt > 0) {
- submit("TRMRF02318");
- var prntableyn = model.getValue("/root/temp/prntableinfo/prntablelist/prntableyn");
-
- if ( prntableyn == "N" ) {
- messageBox("출력할 수 없는 수진이력입니다 사본발행이나 제증명 수진이력이외의 수진이력을 선택해 주십시오","I");
- return;
- }
- }
-
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/preass", 5873);
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/jinjeong", 5554);
-
- var formcd = model.getValue("/root/main/ordinfo/formcd");
- var formcdcnt = getNodeSetCnt("/root/init/jinjeong/hardcd[hardcd = '" + formcd + "']"); //진정 동의서
- var precnt = getNodeSetCnt("/root/init/preass/hardcd"); //진정전 평가서
-
- if (formcdcnt > 0 && precnt > 0) {
- if ( "6" == messageBox("진정전 환자 평가서를 작성하시겠습니까?", "Q")) {
- _preass = "Y";
- }
- }
-
- //재출력만 가능한 서식
- if (fContainsHardCD("6005", formcd)){
- messageBox("재출력만 가능한 서식입니다. 처방발행후 발행리스트 탭을 이용하시기 바랍니다 문의:의무기록팀", "I");
- return;
- }
- // 20110721
- // 출력하는 동의서가 진정동의서와 같이 출력 되어야 하는지 체크
- var jinjeong="";
- if(getParameter("jinjeongchk")==""){
- submit("TRMRF02315");
- if(model.getValue("/root/main/jinjeong/jinjeonginfo/chkflag")=="true"){
- jinjeong=messageBox("진정 동의서를 출력하시겠습니까? ", "S001", ""); //예:6 아니오:7 취소:2
-
- if(jinjeong=="6"){
- model.makeValue("/root/main/jinjeong/jinjeonginfo/printyn", "Y");
- model.makeValue("/root/send/reqdata/hardcdno", "5554");
- submit("TRMRF02316");
- setParameter("orijinformcd", model.getValue("/root/main/ordinfo/formcd"));
- setParameter("jinjeongchk", "NO");
- setParameter("jinjeongchk2","");
-
- }else if(jinjeong=="7"){
- setParameter("jinjeongchk", "NO");
- setParameter("jinjeongchk2","");
- }
- }
- }
- // 20110721
-
- if(submit("TRMRF02312") && jinjeong!="2"){
-
- if(getNodesetCount("/root/main/duplocrprnt/msginfo/list") > 0 && (model.getValue("/root/main/duplocrprnt/msginfo/list/statcd") != "CP" && model.getValue("/root/main/duplocrprnt/msginfo/list/statcd") != "D")) {
- //var msg = messageBox("이전 출력 내역이 있습니다. 새서식을 출력", "S003", "재출력을");
-
- // 이윤주 추가(20161104)
- var msg = messageBox("오늘 이전 출력 내역이 있습니다. 새서식으로 출력하시겠습니까?", "Q");
-
- if ( 6 != msg ) {
- return;
- }
- // 재출력인 경우(7)
- if(msg == "7"){
- var formcd = model.getValue("/root/main/duplocrprnt/msginfo/list/formcd");
- var formtypecls = model.getValue("/root/main/duplocrprnt/msginfo/list/formtypecls");
- var ocrtagprntyn = model.getValue("/root/main/duplocrprnt/msginfo/list/ocrtagprntyn");
- var ocrtag = model.getValue("/root/main/duplocrprnt/msginfo/list/ocrtag");
-
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/duplocrprnt/msginfo/list/ordtype"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/duplocrprnt/msginfo/list/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/duplocrprnt/msginfo/list/pid"));
- model.setValue("/root/main/ordinfo/patnm", model.getValue("/root/main/duplocrprnt/msginfo/list/patnm"));
- model.setValue("/root/main/ordinfo/orddd", model.getValue("/root/main/duplocrprnt/msginfo/list/orddd"));
- model.setValue("/root/main/ordinfo/orddeptnm", model.getValue("/root/main/duplocrprnt/msginfo/list/orddeptnm"));
- model.setValue("/root/main/ordinfo/drid",model.getValue("/root/main/duplocrprnt/msginfo/list/orddrid"));
- model.setValue("/root/main/ordinfo/drnm",model.getValue("/root/main/duplocrprnt/msginfo/list/orddrnm"));
- model.setValue("/root/main/ordinfo/sa",model.getValue("/root/main/duplocrprnt/msginfo/list/sa"));
- model.setValue("/root/main/ordinfo/cretno",model.getValue("/root/main/duplocrprnt/msginfo/list/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno",model.getValue("/root/main/duplocrprnt/msginfo/list/rrgstno"));
-
- var sexflag = model.getValue("/root/main/duplocrprnt/msginfo/list/sa");
-
- var rrgstno = model.getValue("/root/main/ordinfo/rrgstno").substring(0, 8) + "XXXXXX";
- model.setValue("/root/main/ordinfo/rrgstno", rrgstno);
- /*
- if(sexflag.substring(0, 1) == "M"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-1XXXXXX");
- } else if(sexflag.substring(0,1) == "F"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-2XXXXXX");
- }
- */
- if(formcd != ''){
- model.setValue("/root/main/ordinfo/formcd", formcd);
- iviewer1.window.javascript.fGetOCRInfo(formcd, null, null, null, null, formtypecls, ocrtagprntyn, ocrtag);
- }
- iviewer1.window.javascript.fPrint("A");
- } else if(msg == "6"){
- iviewer1.window.javascript.fPrint(prntflag);
- } else {
- return;
- }
- } else {
- iviewer1.window.javascript.fPrint(prntflag);
- }
-
- if(model.getValue("/root/main/jinjeong/jinjeonginfo/printyn")=="Y" && getParameter("jinjeongchk2")==""){
- setParameter("jinjeongchk2","NO");
- fJinJeong();
- }
- } else {
- return;
- }
-
- if (_preass == "Y"){
- _preass = "N";
- fOpenPreA();
- }
-
- }
- /**
- * 진정 동의서를 출력
- */
- function fJinJeong(){
- model.setValue("/root/main/selform", model.getValue("/root/main/jinjeongcode/jinjeongcdinfo/jinjeongcd"));
-
- fSearchOcr(); // 진정동의서를 세팅
- fPrintImage(); // 진정동의서를 출력
-
- model.setValue("/root/main/selform", getParameter("orijinformcd")); // 진정동의서 이전 이미지의 formcd를 세팅
- fSearchOcr(); // 원본 이미지로 세팅
- }
- /**
- * @desc : 재인쇄
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fRePrint(){
- /*
- var currentpage = iviewer1.model.getValue("/root/main/ocrinfo/currentpage");
- if(currentpage > 0)
- {
- iviewer1.window.javascript.fPrint(model.getValue("/root/main/ocrinfo/ocrlist[" + currentpage + "]/ocrfilenm"), "P");
- }
- */
- iviewer1.window.javascript.fPrint("P");
- }
- /**
- * @desc : 모두 재인쇄
- *
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAllRePrint(){
- var statcd = model.getValue("/root/main/ordinfo/statcd");
- //상태가 삭제인 경우만 제외하고 재출력이 가능하도록 수정
- if ( statcd != "CP" && statcd != "D" )
- fPrintImage("A");
- else
- messageBox("삭제 상태의 서식은 출력 ", "E001");
- }
- /**
- * @desc : OCR 출력 리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetOCRPrntList(){
- model.removeNodeset("/root/send/reqdata");
- if(model.getValue("/root/main/ordinfo/pid") == ""){
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/ocrprntlist/pid"));
- } else {
- if((model.getValue("/root/main/ocrprntlist/pid") != model.getValue("/root/main/ordinfo/pid")) && (model.getValue("/root/main/ocrprntlist/pid") != "")){
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/ocrprntlist/pid"));
- } else {
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/ordinfo/pid"));
- }
- }
- model.makeValue("/root/send/reqdata/fromdd", model.getValue("/root/main/ocrprntlist/fromdd"));
- model.makeValue("/root/send/reqdata/todd", model.getValue("/root/main/ocrprntlist/todd"));
-
- if (model.getValue("/root/send/reqdata/pid") == "") {
- messageBox("등록번호 없이는 조회가 되지 않습니다 ", "I999");
- return;
- }
-
-
- submit("TRMRF02304");
- }
- /**
- * @desc : OCR 리스트 선택
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSelOCRList(){
- var rownum = grd_ocrprntlist.row;
- var formcd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/formcd");
- var formtypecls = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/formtypecls");
- var ocrtagprntyn = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/ocrtagprntyn");
- var ocrtag = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/ocrtag");
- var eocryn = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/eocryn");
-
- if (eocryn == "Y") {
- btn_pageReprnt.disabled=true;
- btn_Reprnt.disabled=true;
- btn_ecntform.disabled=true;
- btn_mutiprnt.disabled=true;
- btn_prnt.disabled=true;
- }
-
-
-
- // 20100309 한재상 수정 - 유전자검사동의서 재출력
- reqHardCodeInfo("/root/send/reqdata", "/root/init/hardcdno", 199);
- if ( formcd == model.getValue("/root/init/hardcdno/hardcd/hardcd") ) { //유전자검사동의서
- var msgRtn = messageBox("유전자검사동의서는 재출력만 가능합니다.\n\n 유전자검사용 재출력 ", "S006", " 유전자검사용+연구용 재출력| 재출력 안");
- if ( msgRtn == "6" || msgRtn == "7") {
- model.makeValue("/root/send/ocrtag", ocrtag);
-
- var ordtype = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/ioflag");
- if (ordtype == "O" || ordtype == "S") model.makeValue("/root/send/ordtype", "O");
- else model.makeValue("/root/send/ordtype", "I");
- model.makeValue("/root/hidden/geneunitlist", "");
- submit("TRMMO21001", true);
- model.setValue("/root/hidden/geneunitlist/logurl", getBigLogoImageURL("", ""));
- if ( msgRtn == "6" ) model.makeValue("/root/hidden/geneunitlist/inspecttype", "0");
- else if ( msgRtn == "7" ) model.makeValue("/root/hidden/geneunitlist/inspecttype", "1");
- exeReportPreview("RPMMO21001", "XMLSTR" , "/root/hidden/geneunitlist" , "" , "true" , "", "", "", "", "", "", "grp_report");
- }
- } else { // 기존 OCR동의서
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum+"]/ioflag"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/orddeptcd"));
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/pid"));
- model.setValue("/root/main/ordinfo/patnm", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/patnm"));
- model.setValue("/root/main/ordinfo/orddd", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/orddd"));
- model.setValue("/root/main/ordinfo/orddeptnm", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/orddeptnm"));
- model.setValue("/root/main/ordinfo/drid",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/orddrid"));
- model.setValue("/root/main/ordinfo/drnm",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/orddrnm"));
- model.setValue("/root/main/ordinfo/sa",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/sa"));
- model.setValue("/root/main/ordinfo/cretno",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/cretno"));
- model.setValue("/root/main/ordinfo/rrgstno",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/rrgstno"));
- model.makeValue("/root/main/ordinfo/statcd",model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/statcd"));
- var sexflag = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+rownum + "]/sa");
- var rrgstno = model.getValue("/root/main/ordinfo/rrgstno").substring(0, 8) + "XXXXXX";
- model.setValue("/root/main/ordinfo/rrgstno", rrgstno);
- /*
- if(sexflag.substring(0, 1) == "M"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-1XXXXXX");
- } else if(sexflag.substring(0,1) == "F"){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/main/ordinfo/rrgstno") + "-2XXXXXX");
- }
- */
- if(grd_ocrprntlist.isCell(event.target) && grd_ocrprntlist.mouserow >= grd_ocrprntlist.fixedrows) {//그리드에서 데이타영역만 선택
- if(formcd != ''){
- model.setValue("/root/main/ordinfo/formcd", formcd);
- iviewer1.window.javascript.fGetOCRInfo(formcd, null, null, null, null, formtypecls, ocrtagprntyn, ocrtag);
- }
- }
- }
- model.refresh();
-
- }
- /**
- * @desc : 즐겨찾기 OCR 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetFavorOCR(){
- if(swt_ocrinfoflag.selectedIndex == 0){
- var selIndx = trv_ocrlist.selectedIndex + 1;
- var depth = instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").depth.text;
- var ocrForm = instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text;
- } else if(swt_ocrinfoflag.selectedIndex == 3){
- var selIndx = grd_ocrformlist.row;
- var depth = model.getValue("/root/main/formlist[" + selIndx + "]/depth");
- var ocrForm = model.getValue("/root/main/formlist[" + selIndx + "]/formcd");
- }
- model.removeNodeSet("/root/main/favor/savedata");
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- /*
- switch(depth){
- case "1":
- model.makeValue("/root/main/favor/savedata/supitemindxseq", "0");
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- case "2":
- model.makeValue("/root/main/favor/savedata/supitemindxseq", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").lrgclscd.text);
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupd", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- case "3":
- model.makeValue("/root/main/favor/savedata/supitemindxseq", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").mdlclscd.text);
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- case "4":
- model.makeValue("/root/main/favor/savedata/supitemindxseq", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").smlclscd.text);
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- case "5":
- model.makeValue("/root/main/favor/savedata/supitemindxseq", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").detclscd.text);
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- default :
- model.makeValue("/root/main/favor/savedata/supitemindxseq", "-1");
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("posdeptcd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").formcd.text);
- }
- break;
- } */
- if(swt_ocrinfoflag.selectedIndex == 0){
- model.makeValue("/root/main/favor/savedata/supitemindxseq", instance1.selectSingleNode("/root/main/ocrinfo/ocrlist[" + selIndx + "]").supindx.text);
- } else if(swt_ocrinfoflag.selectedIndex == 3){
- model.makeValue("/root/main/favor/savedata/supitemindxseq", model.getValue("/root/main/formlist[" + selIndx + "]/supindx"));
- }
- model.makeValue("/root/main/favor/savedata/indxflag", "O");
- model.makeValue("/root/main/favor/savedata/deptcd", getUserInfo("dutplcecd"));
- model.makeValue("/root/main/favor/savedata/userid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/fstrgstdt", getCurrentDate()+getCurrentTime());
- model.makeValue("/root/main/favor/savedata/lastupdtrid", getUserInfo("userid"));
- model.makeValue("/root/main/favor/savedata/lastupdtdt", getCurrentDate()+getCurrentTime());
- if(ocrForm == ""){
- model.makeValue("/root/main/favor/savedata/linkflag", "N");
- model.makeValue("/root/main/favor/savedata/linkcd", "");
- } else {
- model.makeValue("/root/main/favor/savedata/linkflag", "Y");
- model.makeValue("/root/main/favor/savedata/linkcd", ocrForm);
- }
- model.copyNode("/root/send/reqdata", "/root/main/favor/savedata");
- if(submit("TXMRF02301")){
- messageBox("즐겨찾기 등록", "I001");
- fGetFavorList();
- trv_favorlist.refresh();
- } else {
- messageBox("즐겨찾기 등록을", "E009");
- return;
- }
- }
- /**
- * @desc : 즐겨찾기 OCR 리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetFavorList(){
- model.removeNodeset("/root/send/reqdata");
-
- model.makeValue("/root/send/reqdata/indxflag", "O");
- model.makeValue("/root/send/reqdata/userid", getUserInfo("userid"));
- submit("TRMRF02301");
- }
- /**
- * @desc : OCR 트리 구조 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fOcrTreeSrch(){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/ocrflag", model.getValue("/root/main/ocrsch/ocrflag"));
- model.makeValue("/root/send/reqdata/formbizcls", model.getValue("/root/main/ocrsch/formbizcls"));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/ocrsch/dept"));
- model.makeValue("/root/send/reqdata/formchosflag", model.getValue("/root/main/ocrsch/formchosflag"));
- submit("TRMRF02309");
- trv_ocrlist.rebuild();
- }
- /**
- * @desc : 즐겨찾기에 등록
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fAddFavor(){
- var selectedFormcd = "";
- if(swt_ocrinfoflag.selectedIndex == 0){
- selectedFormcd = model.getValue("/root/main/ocrinfo/ocrlist[" + ( trv_ocrlist.mouseRow + 1 )+ "]/formcd");
- } else if(swt_ocrinfoflag.selectedIndex == 3){
- selectedFormcd = model.getValue("/root/main/formlist[" + ( grd_ocrformlist.mouseRow )+ "]/formcd");
- }
- if(selectedFormcd == ""){
- return;
- }
- if(swt_ocrinfoflag.selectedIndex == 0){
- if(trv_ocrlist.isCell(event.target) && trv_ocrlist.mouseRow <= trv_ocrlist.length){
- if( instance1.selectSingleNode("/root/main/favorlist/list[formcd='" + selectedFormcd + "']") != null ){
- messageBox("즐겨찾기에 중복으로 등록", "E001");
- model.setValue("/root/main/selform", "");
- trv_favorlist.rebuild();
- return;
- } else {
- setPopupMenu("trv_ocrlist", false, "/root/init/mouserght", "label", "value");
- }
- } else {
- initPopupMenu();
- }
- } else if(swt_ocrinfoflag.selectedIndex == 3){
- if(grd_ocrformlist.isCell(event.target) && grd_ocrformlist.mouserow >= grd_ocrformlist.fixedrows){
- if( instance1.selectSingleNode("/root/main/favorlist/list[formcd='" + selectedFormcd + "']") != null ){
- messageBox("즐겨찾기에 중복으로 등록", "E001");
- model.setValue("/root/main/selform", "");
- trv_favorlist.rebuild();
- return;
- } else {
- setPopupMenu("grd_ocrformlist", false, "/root/init/mouserght", "label", "value");
- }
- } else {
- initPopupMenu();
- }
- }
- }
- /**
- * @desc : 즐겨찾기에서 삭제
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fDelFavor(){
- if(trv_favorlist.value == ""){
- return;
- }
- var selectedFormcd = trv_favorlist.value;
- if(trv_favorlist.isCell(event.target) && trv_favorlist.mouseRow <= trv_favorlist.length){
- setPopupMenu("trv_favorlist", false, "/root/init/favormouserght", "label", "value");
- } else {
- initPopupMenu();
- }
- }
- /**
- * @desc : OCR 즐겨찾기에서 삭제
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fDelFavorOCR(){
- if(trv_favorlist.focusIndex < 0){
- return;
- }
- var selIndx = trv_favorlist.selectedIndex + 1;
- var ocrItemindx = instance1.selectSingleNode("/root/main/favorlist/list[" + selIndx + "]").itemindxseq.text
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
-
- model.makeValue("/root/send/reqdata/itemindxseq", ocrItemindx);
- model.makeValue("/root/send/reqdata/indxflag", "O");
- model.makeValue("/root/send/reqdata/userid", getUserInfo("userid"));
- submit("TXMRF02302");
- }
- /**
- * @desc : 폼 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSrchForm(){
- model.makeValue("/root/send/reqdata/reqflag", "formnm");
- model.makeValue("/root/send/reqdata/reqdata", model.getValue("/root/main/srchocrformnm"));
- model.makeValue("/root/send/reqdata/reqstatus", "0");
- model.makeValue("/root/send/reqdata/reqformprogflag", "OCR,OCR(CODE)");
-
- submit("TRMRF02302");
- model.removeNodeset("/root/send/reqdata");
- model.setValue("/root/main/srchocrformnm", "");
- }
- /**
- * @desc : OCR 폼리스트 선택
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSelOCRFormList(){
- var rownum = grd_ocrformlist.row;
- var formcd = model.getValue("/root/main/formlist["+rownum+"]/formcd");
- var formtypecls = model.getValue("/root/main/formlist["+rownum+"]/formtypecls");
- var ocrtagprntyn = model.getValue("/root/main/formlist["+rownum+"]/ocrtagprntyn");
- model.makeValue("/root/main/selform", formcd);
- if(grd_ocrformlist.isCell(event.target) && grd_ocrformlist.mouserow >= grd_ocrformlist.fixedrows) {//그리드에서 데이타영역만 선택
- if(formcd != ''){
- iviewer1.window.javascript.fGetOCRInfo(formcd, null, null, null, null, formtypecls, ocrtagprntyn);
- model.setValue("/root/main/ordinfo/formcd", formcd);
- }
- }
- }
- /**
- * @desc : 환자정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetParaInfo(){
- var sexinfo;
- var ageinfo;
- var node = instance1.selectNodes("/root/temp/para/pid");
-
- if(node.length < 1){
- return false;
- }
- model.setValue("/root/main/ordinfo/pid", model.getValue("/root/temp/para/pid"));
- model.setValue("/root/main/ordinfo/orddd", model.getValue("/root/temp/para/orddd"));
- model.setValue("/root/main/ordinfo/orddeptcd", model.getValue("/root/temp/para/orddeptcd"));
- model.setValue("/root/main/ordinfo/orddeptnm", model.getValue("/root/temp/para/orddeptnm"));
- model.setValue("/root/main/ordinfo/drid", model.getValue("/root/temp/para/orddrid"));
- model.setValue("/root/main/ordinfo/drnm", model.getValue("/root/temp/para/drnm"));
- model.setValue("/root/main/ordinfo/ordtype", model.getValue("/root/temp/para/ordtype"));
- model.setValue("/root/main/ordinfo/patnm", model.getValue("/root/temp/para/patnm"));
- model.setValue("/root/main/ordinfo/inroomcd", model.getValue("/root/temp/para/inroomcd"));
- model.setValue("/root/main/ordinfo/cretno", model.getValue("/root/temp/para/cretno"));
- //model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/temp/para/rrgstno1"));
- //나이 구하기
- ageinfo = getFullAge(model.getValue("/root/temp/para/rrgstno1")+model.getValue("/root/temp/para/rrgstno2"));
- //성별 구하기
- sexinfo = getGender(model.getValue("/root/temp/para/rrgstno2"));
-
- var rrgstno = model.getValue("/root/temp/para/rrgstno1") + "-" + model.getValue("/root/temp/para/rrgstno2").substring(0, 1) + "XXXXXX";
-
- model.setValue("/root/main/ordinfo/rrgstno", rrgstno);
-
- /*
- if(sexinfo == 'M'){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/temp/para/rrgstno1") + "-1XXXXXX");
- } else if(sexinfo == 'F'){
- model.setValue("/root/main/ordinfo/rrgstno", model.getValue("/root/temp/para/rrgstno1") + "-2XXXXXX");
- }
- */
- model.setValue("/root/main/ordinfo/sa", sexinfo + "/" + ageinfo);
-
- return true;
- //model.setValue("/root/main/ordinfo/orddeptnm", getPatientInfo("orddept"));
- //model.setValue("/root/main/ordinfo/drnm", getPatientInfo("apntdr"));
- }
- /**
- * @desc : 다중 출력
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fMutiPrnt(){
- var nodeList = "";
-
- if(swt_trgtmanlist.selectedIndex == 0){
- nodeList = instance1.selectNodes("/root/main/trgtmanlist/out/opat/list");
- for(var i = 1; i <= nodeList.length; i++){
- if(model.getValue("/root/main/trgtmanlist/out/opat/list["+i+"]/check") == "true"){
- grd_opatlist.row = i;
- fSelectPat("grd_opatlist");
- fSearchOcr();
- fPrintImage();
- setParameter("jinjeongchk2","");
- }
- }
- setParameter("jinjeongchk", "");
-
- } else if(swt_trgtmanlist.selectedIndex == 1){
- nodeList = instance1.selectNodes("/root/main/trgtmanlist/in/ipat/list");
- for(var i = 1; i <= nodeList.length; i++){
- if(model.getValue("/root/main/trgtmanlist/in/ipat/list["+i+"]/check") == "true"){
- grd_ipatlist.row = i;
- fSelectPat("grd_ipatlist");
- fSearchOcr();
- fPrintImage();
- setParameter("jinjeongchk2","");
- }
- }
- setParameter("jinjeongchk", "");
- } else if(swt_trgtmanlist.selectedIndex == 2){
- nodeList = instance1.selectNodes("/root/main/trgtmanlist/er/erpat/list");
- for(var i = 1; i <= nodeList.length; i++){
- if(model.getValue("/root/main/trgtmanlist/er/erpat/list["+i+"]/check") == "true"){
- grd_epatlist.row = i;
- fSelectPat("grd_epatlist");
- fSearchOcr();
- fPrintImage();
- setParameter("jinjeongchk2","");
- }
- }
- setParameter("jinjeongchk", "");
- } else if(swt_trgtmanlist.selectedIndex == 3){
- nodeList = instance1.selectNodes("/root/main/trgtmanlist/schpat/srchpat/list");
- for(var i = 1; i <= nodeList.length; i++){
- if(model.getValue("/root/main/trgtmanlist/schpat/srchpat/list["+i+"]/check") == "true"){
- grd_srchpatlist.row = i;
- fSelectPat("grd_srchpatlist");
- fSearchOcr();
- fPrintImage();
- setParameter("jinjeongchk2","");
- }
- }
- setParameter("jinjeongchk", "");
- } else if(swt_trgtmanlist.selectedIndex == 4){
-
- //alert("AA");
- nodeList = instance1.selectNodes("/root/main/trgtmanlist/op/oppat/list");
- for(var i = 1; i <= nodeList.length; i++){
- if(model.getValue("/root/main/trgtmanlist/op/oppat/list["+i+"]/check") == "true"){
- grd_oppatlist.row = i;
- fSelectPat("grd_oppatlist");
- fSearchOcr();
- fPrintImage();
- setParameter("jinjeongchk2","");
- }
- }
- setParameter("jinjeongchk", "");
- }
-
- }
- /**
- * @desc : 입원환자 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSettingInPat(){
- var paminfo;
- var paminfocnt = 0;
- var paminfoflag;
- var paminfotag;
- var paminfovalue;
- var pid = "";
- var orddeptcd = "";
- var wardcd = "";
- var orddrid = "";
- model.removeNodeset("/root/main/common/dept");
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/main/common", "depthngnm", "asc");
- copyNodeset("/root/main/trgtmanlist/in/dept", "/root/main/common/dept", "replace");
- //copyNodeset("/root/init/ocrsch/dept", "/root/main/common/dept", "replace");
- addComboItem("cmb_indeptlist", "전체", "-", "above");
- //addComboItem("cmb_ocrdept", "전체", "-", "above");
- paminfo = getGlobalVariable("paminfo");
- if(paminfo.length > 0){
- paminfoflag = paminfo.split("▩");
- paminfotag = paminfoflag[0].split("▦");
- paminfovalue = paminfoflag[1].split("▦");
- while(paminfocnt < paminfotag.length){
- switch(paminfotag[paminfocnt])
- {
- case "pid":
- pid = paminfovalue[paminfocnt];
- break;
- case "orddeptcd":
- orddeptcd = paminfovalue[paminfocnt];
- break;
- case "orddrid":
- orddrid = paminfovalue[paminfocnt];
- break;
- case "wardcd":
- wardcd = paminfovalue[paminfocnt];
- break;
- }
- paminfocnt++;
- }
- }
- if((getUserInfo("jobkindcd") == "0330") || (getUserInfo("jobkindcd") == "0332")){
- cmb_wardlist.value = "-";
- cmb_indeptlist.value = getUserInfo("dutplcecd");
- fChngSrchCond("/root/main/trgtmanlist/in/dept", "/root/main/trgtmanlist/in/drlist", "staff");
- cmb_indrlist.value = getUserInfo("userid");
- fReqInPatList();
- } else if((getUserInfo("jobkindcd") == "2820") || (getUserInfo("jobkindcd") == "1140")){
- cmb_wardlist.value = getUserInfo("dutplcecd");
- cmb_indeptlist.value = "-";
- fChngSrchCond("/root/main/trgtmanlist/in/dept","/root/main/trgtmanlist/in/drlist", "staff");
- cmb_indrlist.value = "-";
- fReqInPatList();
- } else if(pid != "") {
- cmb_wardlist.value = wardcd;
- cmb_indeptlist.value = orddeptcd;
- fChngSrchCond("/root/main/trgtmanlist/in/dept","/root/main/trgtmanlist/in/drlist", "staff");
- cmb_indrlist.value = "-";
- fReqInPatList();
- } else {
- cmb_wardlist.value = "-";
- cmb_indeptlist.value = "-";
- fChngSrchCond("/root/main/trgtmanlist/in/dept","/root/main/trgtmanlist/in/drlist", "staff");
- cmb_indrlist.value = "-";
- }
- }
- /**
- * @desc : 폼 표현 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetFormDisplay(){
- var node = instance1.selectNodes("/root/temp/para/formcd");
-
- if(node.length < 1){
- return false;
- }
- model.setValue("/root/main/selform", model.getValue("/root/temp/para/formcd"));
- trv_ocrlist.expandDepth = "4";
- model.refresh();
- trv_ocrlist.vscroll.attribute("pos") = ( parseInt(trv_ocrlist.attribute("itemheight")) + 1 ) * trv_ocrlist.selectedIndex;
- fSearchOcr();
- }
- /**
- * @desc : 부서코드 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetRgstDeptCD(){
- model.makeValue("/root/send/req/formprogflag", "OCR,OCR(CODE)");
- submit("TRMRF02308");
- model.removeNodeset("/root/send/req");
- }
- function fPrntPopup(){
-
- if(isDataCell() && event.button==3){
- var state = grd_ocrprntlist.valueMatrix(grd_ocrprntlist.mouserow, grd_ocrprntlist.colRef("statcd"));
- setPopupMenu("grd_ocrprntlist", false, "/root/init/mouseright", "label", "value");
- }
- else{
- initPopupMenu();
- }
- }
- function fOcrReprnt(){
-
- var row = grd_ocrprntlist.row;
- var statcd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/statcd");
- var eocryn = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/eocryn");
-
- if ( eocryn == "Y" ) {
- messageBox("전자동의서는 재출력 되지 않습니다","I999");
- return;
- }
-
-
- if ( statcd != "CP" && statcd != "D" ) {
- messageBox("재출력되지 않는 상태입니다","I999");
- return;
- }
- else {
- messageBox("준비중입니다","I999");
- }
-
- }
- function fShowScan() {
-
- var row = grd_ocrprntlist.row;
- var statcd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/statcd");
- var scanyn = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/scanyn");
-
- if(scanyn == "N"){
- messageBox("반납 및 스캔작업이 완료되지 ", "E007");
- return;
- }
-
-
- if(scanyn == "CP" || scanyn == "D"){
- messageBox("삭제된 동의서가 선택되었습니다.", "I", "");
- return;
- }
-
- model.resetInstanceNode("/root/send/iemr");
-
- model.makeValue("/root/send/iemr/pid", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/pid"));
- model.makeValue("/root/send/iemr/docucd", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/formcd"));
- model.makeValue("/root/send/iemr/ocrcode", model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+row+"]/ocrtag"));
-
- if((window.children.item("imgemrviewer") == null) && (model.getValue("/root/send/iemr/pid") != "") &&
- (model.getValue("/root/send/iemr/docucd") != "") && (model.getValue("/root/send/iemr/ocrcode") != ""))
- {
- window.load("../../../emr/imgemrweb/xrw/SSMRC03130.xrw", "modeless", "imgemrviewer", "", "/root/send/iemr", "/root/hidden/temp");
- window.children.item("imgemrviewer").document.title = "Image EMR Viewer";
- }
-
- }
- /**
- * @desc : 받을 리스트
- *
- * @param :
- * @return :
- * @author : 이윤주
- * @---------------------------------------------------
- */
- function fSrchNeeded(){
-
- var pid = model.getValue("/root/main/ordinfo/pid");
- var cretno = model.getValue("/root/main/ordinfo/cretno");
- var orddd = model.getValue("/root/main/ordinfo/orddd");
-
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/send/reqdata/orddd", orddd);
-
- submit("TRMRF02317");
- }
- /**
- * @desc : 전자동의서 오픈
- *
- * @param :
- * @return :
- * @author : 이윤주
- * @---------------------------------------------------
- */
- function fOpenElecOCR (pid,cretno,orddd,ordtype,formcd,flag,tmflag,pensize,pencolor1,pencolor2,pencolor3,penstyle ) {
-
- if (pid == "") {
- messageBox("환자정보가 없습니다","I999");
- return;
- }
-
- if (formcd == "") {
- messageBox("서식정보가 없습니다","I999");
- return;
- }
-
- setParameter("SSMRC03160_param_patid",pid);
- setParameter("SSMRC03160_param_cretno",cretno);
- setParameter("SSMRC03160_param_indate",orddd);
- setParameter("SSMRC03160_param_class",ordtype);
- setParameter("SSMRC03160_param_docucd",formcd);
- setParameter("SSMRC03160_param_flag",flag);
- setParameter("SSMRC03160_param_pensize",pensize);
- setParameter("SSMRC03160_param_pencolor1",pencolor1);
- setParameter("SSMRC03160_param_pencolor2",pencolor2);
- setParameter("SSMRC03160_param_pencolor3",pencolor3);
- setParameter("SSMRC03160_param_penstyle",penstyle);
-
- // setParameter("SSMRC03160_param_patid","3241518");
- // setParameter("SSMRC03160_param_cretno","1");
- // setParameter("SSMRC03160_param_indate","20141212");
- // setParameter("SSMRC03160_param_class","E");
- // setParameter("SSMRC03160_param_docucd","1100010798");
- // setParameter("SSMRC03160_param_flag","G");
- // setParameter("SSMRC03160_param_pensize",2);
- // setParameter("SSMRC03160_param_pencolor1",0);
- // setParameter("SSMRC03160_param_pencolor2",0);
- // setParameter("SSMRC03160_param_pencolor3",0);
- // setParameter("SSMRC03160_param_penstyle",0);
- // setParameter("SSMRC03160_param_ocrtag","2015051089551");
-
-
- modal ("SSMRC03160");
-
- }
- function fSetPrntCancel() {
-
- var row = grd_neededlist.row;
- var currDT = getCurrentDate()+getCurrentTime();
- var pid = model.getValue("/root/main/neededlist["+row+"]/pid");
- var cretno = model.getValue("/root/main/neededlist["+row+"]/cretno");
- var orddd = model.getValue("/root/main/neededlist["+row+"]/orddd");
- var orddeptcd = model.getValue("/root/main/neededlist["+row+"]/orddeptcd");
- var orddrid = model.getValue("/root/main/neededlist["+row+"]/orddrid");
- var ocrtag = model.getValue("/root/main/neededlist["+row+"]/ocrtag");
-
-
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/send/reqdata/orddd", orddd);
- model.makeValue("/root/send/reqdata/orddeptcd", orddeptcd);
- model.makeValue("/root/send/reqdata/orddrid", orddrid);
- model.makeValue("/root/send/reqdata/ocrtag", ocrtag);
- model.makeValue("/root/send/reqdata/prntdeptcd", "");
- model.makeValue("/root/send/reqdata/prntdeptnm", "");
- model.makeValue("/root/send/reqdata/prntusernm", "");
- model.makeValue("/root/send/reqdata/statcd", "CP");
- model.makeValue("/root/send/reqdata/rtncnfm", "N");
- model.makeValue("/root/send/reqdata/lstupdtdt", currDT);
- model.makeValue("/root/send/reqdata/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.makeValue("/root/send/reqdata/lstupdtuserid", getUserInfo("userid"));
- model.makeValue("/root/send/reqdata/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.makeValue("/root/send/reqdata/lstupdtusernm", getUserInfo("usernm"));
- model.makeValue("/root/send/reqdata/eocryn","N");
-
-
- if(!submit("TXMRF02303")){
- messageBox("삭제 실패", "I999");
- return false;
- }
-
- return true;
- }
- function fOpenPreA() {
- var sa = model.getValue("/root/main/ordinfo/sa");
-
- var pid = model.getValue("/root/main/ordinfo/pid");
- var orddd = model.getValue("/root/main/ordinfo/orddd");
- var cretno = model.getValue("/root/main/ordinfo/cretno");
- var ioflag = model.getValue("/root/main/ordinfo/ordtype");
- var orddeptcd = model.getValue("/root/main/ordinfo/orddeptcd");
- var orddrid = model.getValue("/root/main/ordinfo/drid");
- var patnm = model.getValue("/root/main/ordinfo/patnm");
- var age = sa.substr(1,3);
- var sex = sa.substr(0,1);
- var suppdeptcd = "";
- var formdeptcd = "";
-
- setParameter("SPMMR05400_parm_pinfo", pid + "▦" + orddd + "▦" + cretno + "▦" + ioflag + "▦" + orddeptcd + "▦" + orddrid +"▦"+ patnm + "▦" + age + "▦" + sex + "▦" + suppdeptcd + "▦" + formdeptcd);
-
- var formcd = model.getValue("/root/init/preass/hardcd/hardcd"); //서식코드
-
- setParameter("SPMMR05400_parm_formcd", formcd ); // 진정전 평가서
- setParameter("SPMMR05400_tabflag", "formlist");
- setParameter("SPMMR05400_parm_formrecdd", getCurrentDate());
-
- open("SPMMR05400", "", "", "" ,"SPMMR05400", "", "");
- }
- function fRePrntOCR(){
- var formtypecls = "";
- var ocrtagprntyn = "";
- var iRow = grd_ocrprntlist.row;
- ivw_ocrprnt.attribute("src") = "../../../emr/formmngtweb/xrw/SSMRF03800_OCR뷰어.xrw";
- var formcd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/formcd");
- var pid = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/pid");
- var orddd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/orddd");
- var cretno = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/cretno");
- var ordtype = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/ioflag");
- var ocrtag = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/ocrtag");
- var statcd = model.getValue("/root/main/ocrprntlist/ocrprnthist/list["+ iRow + "]/statcd");
-
- // 변경 요청번호 1851에 따른 수정
- // 2009-07-24 nj
- if(statcd == "D" || statcd == "CP" || statcd == "C" ){
- messageBox("재출력 할 수 없는 상태입니다", "I");
- return;
- }
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/ocrtag", ocrtag);
-
- /* var returnVal = fGetHardCDList("Y", 199, 3);dnpq
- //유전자검사 동의서 재출력(2011.12.08 lyj)
- if ( formcd == returnVal ) */
-
- if( fContainsHardCD("199", formcd))
- {
- ivw_ocrprnt.window.javascript.fGenePrint(ocrtag,ordtype,formcd);
- return;
- }
-
- if(submit("TRMRF02605")){
- formtypecls = model.getValue("/root/main/ocrforminfo/formtypecls");
- ocrtagprntyn = model.getValue("/root/main/ocrforminfo/ocrtagprntyn");
- ivw_ocrprnt.window.javascript.fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag);
- ivw_ocrprnt.window.javascript.fPrint("A");
- }
- }
|