12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 연구용검색 ( SMMRD01600_연구용검색.xrw - JScript )
- - Version :
- 1) : Ver.1.00.00
- - Author : 강지훈
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- var xDschAnalyListPath = "/root/main/cond";
- /**
- * @ver : 2009-01-02
- * @desc : 화면초기화
- * @
- * @by : 강지훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- btn_cond.selected = true;
-
-
-
- //퇴원일은 기본조건으로 10년치 초기화 한다
- var dschfromdd = (getCurrentDate().substring(0,4) - 10)+getCurrentDate().substring(4,8);
- //테스트위해 임시수정
- ipt_fromdd.value = dschfromdd;
- //ipt_fromdd.value = getCurrentDate();
- ipt_todd.value = getCurrentDate();
-
- //엑셀출력을 위한 기관코드 설정
- model.setValue("/root/main/cond/instcd", getUserInfo("dutplceinstcd"));
-
- //퇴원병동 설정
- submit("TRMNW00101");
- model.removenode("/root/init/init/ward[wardcd = '']"); // 응급의료센터 제외
-
- //과정보 설정
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "T");
-
- //공통코드 설정
- zbcfGetCodeList(new Array("M0149", "M0070", "M0151", "M0153",
- "M0155","M0152","M0157","M0156",
- "M0158","M0159","M0086","M0165",
- "P0008","M0413","M0484","M0414",
- "M0433","M0184","M0155","M0500",
- "M0501","M0502","M0503", "M0415"),
- new Array("/root/init/jobList", "/root/init/relignList", "/root/init/maryStatList", "/root/init/inPathList",
- "/root/init/dethTypeList","/root/init/cureRsltList" ,"/root/init/DschTypeList","/root/init/chosProgList",
- "/root/init/reInResnList","/root/init/reOpResnList","/root/init/partrtntypeList","/root/init/womntypeList",
- "/root/init/insukindList","/root/init/opDethTypeList","/root/init/infccaselist","/root/init/cmpllist",
- "/root/init/cncrlist", "/root/init/seer", "/root/init/staging", "/root/init/mdclrsdeptlist",
- "/root/init/gsclrsdeptlist", "/root/init/gyclrsdeptlist", "/root/init/pdclrsdeptlist", "/root/init/wundcasclslist")
- , true);
-
- // 중환자실 코드 설정
- model.makeValue("/root/send/stnddd", getCurrentDate() );
- if(submit("TRMRD00404", false)){
- copyNodesetType("/root/init/icudeptlist/icudept","/root/temp/initlist/icudept","replace", model, model);
- }
-
- //지표관리 코드 설정
- submit("TRMRD01603");
-
-
- // 초기 선택값 셋팅
-
- addComboItem("cmb_dschclsdept" , "전체", "-", "above");
- addComboItem("cmb_inclsdept" , "전체", "-", "above");
- addComboItem("cmb_opclsdept" , "전체", "-", "above");
- addComboItem("cmb_chngclsdept" , "전체", "-", "above");
- addComboItem("cmb_dschdeptcd" , "전체", "-", "above");
- addComboItem("cmb_dschwardnm" , "전체", "-", "above");
- addComboItem("cmb_religncd" , "전체", "-", "above");
- addComboItem("cmb_marystatcd" , "전체", "-", "above");
- addComboItem("cmb_jobcd" , "전체", "-", "above");
- addComboItem("cmb_insukind" , "전체", "-", "above");
- addComboItem("cmb_curersltcd" , "전체", "-", "above");
- addComboItem("cmb_dethtypecd" , "전체", "-", "above");
- addComboItem("cmb_dschtypecd" , "전체", "-", "above");
- addComboItem("cmb_opdethtypecd" , "전체", "-", "above");
- addComboItem("cmb_chosprogcd" , "전체", "-", "above");
- addComboItem("cmb_reinresncd" , "전체", "-", "above");
- addComboItem("cmb_inpathcd" , "전체", "-", "above");
- addComboItem("cmb_reopresncd" , "전체", "-", "above");
- addComboItem("cmb_infccascd" , "전체", "-", "above");
- addComboItem("cmb_cmplcd" , "전체", "-", "above");
- addComboItem("cmb_icuroomcd" , "전체", "-", "above");
- addComboItem("cmb_infcpartcd" , "전체", "-", "above");
- addComboItem("cmb_womntypeList" , "전체", "-", "above");
- addComboItem("cmb_partrtntypeList" , "전체", "-", "above");
- addComboItem("cmb_seer" , "전체", "-", "above");
- addComboItem("cmb_cncrflag" , "전체", "-", "above");
- addComboItem("cmb_wundcasclscd" , "전체", "-", "above");
-
-
- model.setValue("/root/main/cond/dschwardnm" , "-");
- model.setValue("/root/main/cond/dschdeptcd" , "-");
- model.setValue("/root/main/cond/dschclsdept" , "-");
- model.setValue("/root/main/cond/indeptcd" , "-");
- model.setValue("/root/main/cond/inclsdept" , "-");
- model.setValue("/root/main/cond/opdeptcd" , "-");
- model.setValue("/root/main/cond/opclsdept" , "-");
- model.setValue("/root/main/cond/chngdeptcd" , "-");
- model.setValue("/root/main/cond/chngclsdept" , "-");
- model.setValue("/root/main/cond/cnstreqdeptcd" , "-");
- model.setValue("/root/main/cond/cnstclsdept" , "-");
- model.setValue("/root/main/cond/cnstexecdeptcd" , "-");
- model.setValue("/root/main/cond/cnstexeclrsdeptcd" , "-");
- model.setValue("/root/main/cond/religncd" , "-");
- model.setValue("/root/main/cond/marystatcd" , "-");
- model.setValue("/root/main/cond/jobcd" , "-");
- model.setValue("/root/main/cond/insukind" , "-");
- model.setValue("/root/main/cond/cptrgt" , "-");
- model.setValue("/root/main/cond/wundcasclscd" , "-");
- model.setValue("/root/main/cond/curersltcd" , "-");
- model.setValue("/root/main/cond/dethtypecd" , "-");
- model.setValue("/root/main/cond/dschtypecd" , "-");
- model.setValue("/root/main/cond/opdethtypecd" , "-");
- model.setValue("/root/main/cond/chosprogcd" , "-");
- model.setValue("/root/main/cond/reinresncd" , "-");
- model.setValue("/root/main/cond/inpathcd" , "-");
- model.setValue("/root/main/cond/reopresncd" , "-");
- model.setValue("/root/main/cond/infccascd" , "-");
- model.setValue("/root/main/cond/cmplcd" , "-");
- model.setValue("/root/main/cond/icuroomcd" , "-");
- model.setValue("/root/main/cond/reinyn" , "-");
- model.setValue("/root/main/cond/infcpartcd" , "-");
- model.setValue("/root/main/cond/womntypecd" , "-");
- model.setValue("/root/main/cond/partrtnkindcd" , "-");
- model.setValue("/root/main/cond/seer" , "-");
- model.setValue("/root/main/cond/staging" , "-");
- model.setValue("/root/main/cond/cncrflag" , "-");
-
-
- //그리드의 인스턴스를 삭제한다.
- model.removeNodeset("/root/main/cclist");
- model.removeNodeset("/root/main/diagcdlist");
- model.removeNodeset("/root/main/opcdlist");
- model.removeNodeset("/root/main/chngcdlist");
- model.removeNodeset("/root/main/cnstcdlist");
- model.removeNodeset("/root/main/bfcdlist");
- model.removeNodeset("/root/main/mdlcdlist");
- model.removeNodeset("/root/main/directcdlist");
- model.removeNodeset("/root/main/tcdlist");
- model.removeNodeset("/root/main/mcdlist");
- model.removeNodeset("/root/main/metstascdlist");
-
-
-
- model.refresh();
- }
- /**
- * @desc : 의사조회
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur :
- */
- function fDrSearch(drid, drnm){
- model.resetInstanceNode("/root/main/userpopupinfo");
- model.removeNodeset("/root/main/tempuserinfo");
- model.makeNode("/root/main/tempuserinfo");
- model.removeNode("/root/send/userinfo/userid");
- model.makeNode("/root/send/userinfo/userid");
- model.setValue("/root/main/userpopupinfo/param", "_OneS_DD");
-
- modal("SPMRD01601_사용자부서선택조회", "", "200", "200", "SPMRD01601","/root/main/userpopupinfo","/root/main/temp");
-
- var iParam = getParameter("SPMRD01601_");
- setCSVToNode("/root/main/tempuserinfo", iParam);
- clearParameter("SPMRD01601_");
-
- var emplno = model.getValue("/root/main/tempuserinfo/list/userid");
- var empInm = model.getValue("/root/main/tempuserinfo/list/usernm");
-
-
- model.setValue("/root/main/cond/" + drid, emplno);
- model.setValue("/root/main/cond/" + drnm, empInm);
-
- model.refresh();
- }
- /**
- * @desc : 항목별 입력 여부 체크
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fCheckItemInputYN(pFlag){
- // 치료결과 체크
- if(pFlag == "curerslt" || pFlag == null){
- var sCureRsltCD = model.getValue(xDschAnalyListPath+"/curersltcd");
- if(sCureRsltCD == "07" || sCureRsltCD == "08"){
- cmb_dethtypecd.disabled = false;
- cmb_opdethtypecd.disabled = false;
- }else{
- cmb_dethtypecd.disabled = true;
- cmb_opdethtypecd.disabled = true;
- model.makeValue(xDschAnalyListPath+"/dethtypecd","-");
- }
- }
-
- // 재입원(Unplan) 체크
- if(pFlag == "reinresn" || pFlag == null){
- var sReInResnCd = model.getValue(xDschAnalyListPath+"/reinresncd");
- if(sReInResnCd != ""){
- model.setValue(xDschAnalyListPath+"/reinyn","-");
- cmb_reinyn.disabled = true;
- }else{
- cmb_reinyn.disabled = false;
- }
- }
- // 재입원(plan) 체크
- if(pFlag == "reinyn" || pFlag == null){
- var ReInYN = model.getValue(xDschAnalyListPath+"/reinyn");
- if(ReInYN=="01"){
- model.setValue(xDschAnalyListPath+"/reinresncd","-");
- cmb_reinresncd.disabled = true;
- cmb_reinresncd.refresh();
- }else{
- cmb_reinresncd.disabled = false;
- cmb_reinresncd.refresh();
- }
- }
-
- // 감염종류1 선택
- if(pFlag == "infccascd" || pFlag == null){
- var code = model.getValue(xDschAnalyListPath+"/infccascd");
- fGetInFcCas(code);
- cmb_infcpartcd.refresh();
- addComboItem("cmb_infcpartcd" , "전체", "-", "above");
- model.setValue(xDschAnalyListPath+"/infcpartcd","-");
- model.refresh();
- }
- }
- /**
- * @ver : 2009-01-02
- * @desc : 감염종류1의 감염종류2의 하부항목들 조회
- * @by : 강지훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetInFcCas(code){
- switch(code){
- case "-":
- model.removeNodeset("/root/init/infdcpartinfo/infdcpartlist");
- break;
- case "01":
- zbcfGetCodeList(new Array("M0485"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0485");
- break;
- case "02":
- zbcfGetCodeList(new Array("M0486"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0486");
- break;
- case "03":
- zbcfGetCodeList(new Array("M0487"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0487");
- break;
- case "04":
- zbcfGetCodeList(new Array("M0488"),new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0488");
- break;
- case "05":
- zbcfGetCodeList(new Array("M0489"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0489");
- break;
- case "06":
- zbcfGetCodeList(new Array("M0490"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0490");
- break;
- case "07":
- zbcfGetCodeList(new Array("M0491"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0491");
- break;
- case "08":
- zbcfGetCodeList(new Array("M0492"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0492");
- break;
- case "09":
- zbcfGetCodeList(new Array("M0493"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0493");
- break;
- case "10":
- zbcfGetCodeList(new Array("M0494"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0494");
- break;
- case "11":
- zbcfGetCodeList(new Array("M0495"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0495");
- break;
- case "12":
- zbcfGetCodeList(new Array("M0496"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0496");
- break;
- case "13":
- zbcfGetCodeList(new Array("M0497"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0497");
- break;
- }
-
- model.removeNodeset("/root/hidden/infdcpartinfo/infdcpartlist");
- model.makeNode("/root/hidden/infdcpartinfo/infdcpartlist");
-
- }
- /**
- * @ver : 2009-01-08
- * @desc : 검색조건에 대한 결과를 조회
- * @by : 강지훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- if(!doChkSrchCond()){
- return;
- }
-
- //섹션과 그리드조건을 cond노드에 셋팅
- doSetSrchCond();
-
-
- copyNodeType("/root/main/cond", "/root/main/cond", "replace", iviewer_list.model , "");
- if(iviewer_list.window.javascript.fSearchList()){
- //조회후 section Data 삭제
- doSetNullSrchCond();
- grp_cond.visible = false;
- iviewer_list.visible = true;
- btn_rlst.selected = true;
-
- };
-
-
- button16.visible=true;
- model.refresh();
- }
- /**
- * @ver : 2009-01-02
- * @desc : 감염종류1의 감염종류2의 하부항목들 조회
- * @by : 강지훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetCD(grdNm, colNm){
- var instanceNm = grdNm.substr(4);
- var grdObj = document.all(grdNm);
- var fstRowStat = "";
- //그리드에 데이터가 한건이라도있어야 돌아간다
-
- var grdObjCnt = grdObj.rows;
-
- model.setValue("/root/main/cond/n_"+colNm, "");
-
- if(grdObjCnt > 1){
-
- var sql = "";
- var sqlNot = "";
-
- for(var i = 1 ; i < grdObjCnt; i++){
- var code1 = model.getValue("/root/main/"+ instanceNm +"/rows["+ i +"]/cdid1");
- var code2 = model.getValue("/root/main/"+ instanceNm +"/rows["+ i +"]/cdid2");
- var cond = model.getValue("/root/main/"+ instanceNm +"/rows["+ i +"]/cond");
- if(colNm == "diagtermcd"){ //20101110-김양수추가-질병코드일경우 R/O제외조건추가
- var exceptro = model.getValue("/root/main/"+ instanceNm +"/rows["+ i +"]/exceptro");
- }
- var code1Ln = code1.length;
- var code2Ln = code2.length;
-
- //데이터가 모두비었으면 스탑~
- if(code1 == "" && code2 == "" ){
-
- //한줄도 안들어가있으면 AND안찍기위해서...
- if(i == 1){
- fstRowStat = "B";
- }
- else{ //마지막줄이 비어있고 마지막전줄에 COND가 설정되어있다면 빼주기위해서
- var a = i -1;
- sql = sql.substr(0, sql.length-(model.getValue("/root/main/"+ instanceNm +"/rows["+ a +"]/cond").length));
- }
- break;
- }
-
- //-----SQL GROUP START-------
-
-
- if(i > 1){
- if(cond == "NOT"){
- sqlNot = " (" + sqlNot;
- }else{
- sql = " (" + sql;
- }
- }
-
- var sqlHead = "";
- if(colNm == "cctermcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrddccindx indx WHERE dsam.instcd = indx.instcd AND dsam.pid = indx.pid AND dsam.dschdd = indx.dschdd";
- }
- else if(colNm == "diagtermcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrdddiagindx indx WHERE dsam.instcd = indx.instcd AND dsam.pid = indx.pid AND dsam.dschdd = indx.dschdd";
- }
- else if(colNm == "optermcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrddopindx indx WHERE dsam.instcd = indx.instcd AND dsam.pid = indx.pid AND dsam.dschdd = indx.dschdd";
- }
- else if(colNm == "chngdeptcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrdddscd dscd WHERE dsam.instcd = dscd.instcd AND dsam.pid = dscd.pid AND dsam.dschdd = dscd.dschdd";
- }
- else if(colNm == "tophcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrdhcncr cncr WHERE dsam.instcd = cncr.instcd AND dsam.pid = cncr.pid AND dsam.dschdd = cncr.dschdd";
- }
- else if(colNm == "morphcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrdhcncr cncr WHERE dsam.instcd = cncr.instcd AND dsam.pid = cncr.pid AND dsam.dschdd = cncr.dschdd";
- }
- else if(colNm == "rerntmetstaspartcd"){
- sqlHead = "(SELECT 'Y' FROM emr.mrdhcncr cncr WHERE dsam.instcd = cncr.instcd AND dsam.pid = cncr.pid AND dsam.dschdd = cncr.dschdd";
- }
- else if(colNm == "dethcd"){ //사인코드 2009-12-17 추가
- sqlHead = "(SELECT 'Y' FROM emr.mrdddethindx indx WHERE dsam.instcd = indx.instcd AND dsam.pid = indx.pid AND dsam.dschdd = indx.dschdd";
- }
-
- var subSql = "";
- //2010-01-25 추가
- if(cond == "NOT" ){ //code1만 조건 추가됨
- //코드가 하나일경우 EQUAL 검색
- if(colNm == "morphcd"){
- subSql = " AND (morphcd1 = '" + code1 + "' OR morphcd2 = '" + code1 + "') ";
- }
- else if(colNm == "rerntmetstaspartcd"){
- subSql = " AND (rerntmetstaspartcd1 = '" + code1 + "' OR rerntmetstaspartcd2 = '" + code1 + "' OR rerntmetstaspartcd3 = '" + code1 + "' OR rerntmetstaspartcd4 = '" + code1 + "') ";
- }
- else if(colNm == "rectermcd"){//협진코드 sqlHead 쿼리 없음
- if(i > 1){
- subSql = " AND RPAD(" + colNm +", 10, '0') NOT LIKE '" + code1 + "%' ";
- }else{
- subSql = " RPAD(" + colNm +", 10, '0') NOT LIKE '" + code1 + "%' ";
- }
- }
- else{
- if(model.getValue("/root/main/cond/icd10") == "E"){ //ICD10코드 확장코드까지 검색
- subSql = " AND " + colNm +" = '" + code1 + "' ";
- }
- else{ //ICD10코드만으로 검색
- subSql = " AND RPAD(" + colNm +", 10, '0') LIKE '" + code1 + "%' ";
- }
- }
- //==================================================================================
- }else{
- //코드가 하나일경우 EQUAL 검색
- if(code1 != "" && code2 == ""){
- if(colNm == "morphcd"){
- subSql = " AND (morphcd1 = '" + code1 + "' OR morphcd2 = '" + code1 + "') ";
- }
- else if(colNm == "rerntmetstaspartcd"){
- subSql = " AND (rerntmetstaspartcd1 = '" + code1 + "' OR rerntmetstaspartcd2 = '" + code1 + "' OR rerntmetstaspartcd3 = '" + code1 + "' OR rerntmetstaspartcd4 = '" + code1 + "') ";
- }
- else if(colNm == "rectermcd"){//협진코드 sqlHead 쿼리 없음
- if(i > 1){
- subSql = " AND RPAD(" + colNm +", 10, '0') LIKE '" + code1 + "%' ";
- }else{
- subSql = " RPAD(" + colNm +", 10, '0') LIKE '" + code1 + "%' ";
- }
- }
- else{
- if(model.getValue("/root/main/cond/icd10") == "E"){ //ICD10코드 확장코드까지 검색
- subSql = " AND " + colNm +" = '" + code1 + "' ";
- }
- else{ //ICD10코드만으로 검색
- subSql = " AND RPAD(" + colNm +", 10, '0') LIKE '" + code1 + "%' ";
- }
- }
- }
- //코드 1,2 가 모두있을경우 BETWEEN 검색
- else if(code1 != "" && code2 != ""){
- if(colNm == "morphcd"){
- subSql = " AND ((morphcd1 >= '"+ code1 +"' AND morphcd1 <= '"+ code2 +"') OR (morphcd2 >= '"+ code1 +"' AND morphcd2 <= '"+ code2 +"'))";
- }
- else if(colNm == "rerntmetstaspartcd"){
- subSql = " AND ((rerntmetstaspartcd1 >= '"+ code1 +"' AND rerntmetstaspartcd1 <= '"+ code2 +"') OR (rerntmetstaspartcd2 >= '"+ code1 +"' AND rerntmetstaspartcd2 <= '"+ code2 +"') OR (rerntmetstaspartcd3 >= '"+ code1 +"' AND rerntmetstaspartcd3 <= '"+ code2 +"') OR (rerntmetstaspartcd4 >= '"+ code1 +"' AND rerntmetstaspartcd4 <= '"+ code2 +"'))";
- }//==2009-12-18 질병코드
- else if(colNm == "diagtermcd"){
-
- //subSql = " AND (RPAD("+ colNm +", "+ code1Ln +", '0') >= '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <= '" + code2 + "') ";
- //20101123-김양수주석처리(원본)
- //subSql = " AND (SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '.', 1, 1)-1) >= '" + code1 + "' AND SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '.', 1, 1)-1) <= '" + code2 + "') ";
- /* =============20101123-김양수-M-Code검색않되는 오류로 수정시작.================*/
- var code1yn = ""; code2yn = "";
- var code1sep = ""; code1opersymbol = ""; code2sep = ""; code2opersymbol = "";
- if(code1.substring(0,1) == "M"){
- for (var k = 0; k < code1.length; k++) {
- if (code1.charAt(k) == '/'){
- code1yn = "Y";
- break;
- }else{
- }
- }
- }
-
- if(code2.substring(0,1) == "M"){
- for (var m = 0; m < code2.length; m++) {
- if (code2.charAt(m) == '/'){
- code2yn = "Y";
- break;
- }
- else{
- }
- }
- }
- if(code1yn == "Y"){//code1이 M-Code이면서 '/'존재시
- code1sep = "/";
- code1opersymbol = "+1";
- }else{
- code1sep = ".";
- code1opersymbol = "-1";
- }
- if(code2yn == "Y"){//code2가 M-Code이면서 '/'존재시
- code2sep = "/";
- code2opersymbol = "+1";
- }else{
- code2sep = ".";
- code2opersymbol = "-1";
- }
- subSql = " AND (SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '" + code1sep + "', 1, 1)" + code1opersymbol + ") >= '" + code1 + "' AND SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '" + code2sep + "', 1, 1)" + code2opersymbol + ") <= '" + code2 + "') ";
- //subSql = " AND (SUBSTR("+ colNm +", 0, 4) >= '" + code1 + "' AND SUBSTR("+ colNm +", 0, 4) <= '" + code2 + "') ";
- /*==========20101123-김양수-M-Code검색않되는 오류로 수정끝.===============================*/
- }
- else if(colNm == "rectermcd"){//협진코드
-
- if(cond == "NOT"){
- if(i > 1){
- subSql = " AND (RPAD("+ colNm +", "+ code1Ln +", '0') <> '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <> '" + code2 + "') ";
- }else{
- subSql = " (RPAD("+ colNm +", "+ code1Ln +", '0') <> '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <> '" + code2 + "') ";
- }
- }else{
- if(i > 1){
- subSql = " AND (RPAD("+ colNm +", "+ code1Ln +", '0') >= '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <= '" + code2 + "') ";
- }else{
- subSql = " (RPAD("+ colNm +", "+ code1Ln +", '0') >= '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <= '" + code2 + "') ";
- }
- }
-
- }
- else{
- //subSql = " AND ("+ colNm +" >= '" + code1 + "' AND "+ colNm +" <= '" + code2 + "') ";
- //subSql = " AND (RPAD("+ colNm +", "+ code1Ln +", '0') >= '" + code1 + "' AND RPAD("+ colNm +", "+ code2Ln +", 'Z') <= '" + code2 + "') ";
- subSql = " AND (SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '.', 1, 1)-1) >= '" + code1 + "' AND SUBSTR("+ colNm +", 0, INSTR("+ colNm +", '.', 1, 1)-1) <= '" + code2 + "') ";
-
- }
- }
- }
-
- //NOT 추가============================================
- if(cond == "NOT" && colNm != "rectermcd"){
- //Sql합체~
- //sqlNot = sqlNot + sqlHead + subSql + " AND ROWNUM = 1) = 'Y'"; --원본
- if(colNm == "diagtermcd" && exceptro == "Y"){ //20101110-김양수-추가-R/O제외
- sqlNot = sqlNot + sqlHead + subSql + " AND NVL(DIAGKINDCD, 'C') <> 'R' AND ROWNUM = 1) = 'Y'"; //질병코드 R/O제외체크시
- }else{
- sqlNot = sqlNot + sqlHead + subSql + " AND ROWNUM = 1) = 'Y'";
- }
-
- if(i > 1){
- sqlNot = sqlNot + ") ";
- }
- //-----SQL GROUP END---------
-
- //마지막줄이 아닐경우 조건설정
- if(i != grdObjCnt-1){
- sqlNot = sqlNot + " OR ";
- }
-
- }else{
- //Sql합체~
- if(colNm == "rectermcd"){
- sql = sql + sqlHead + subSql;
- }else{
- //sql = sql + sqlHead + subSql + " AND ROWNUM = 1) = 'Y'"; --원본
- if(colNm == "diagtermcd" && exceptro == "Y"){ //20101110-김양수-추가- R/O제외
- sql = sql + sqlHead + subSql + " AND NVL(DIAGKINDCD, 'C') <> 'R' AND ROWNUM = 1) = 'Y'"; //질병코드 R/O제외체크시
- }else{
- sql = sql + sqlHead + subSql + " AND ROWNUM = 1) = 'Y'";
- }
- }
-
- if(i > 1){
- sql = sql + ") ";
- }
- //-----SQL GROUP END---------
-
- //마지막줄이 아닐경우 조건설정
- if(i != grdObjCnt-1){
- sql = sql + " " + cond;
- }
-
- }
- //====================================================
- /* //Sql합체~
- sql = sql + sqlHead + subSql + " AND ROWNUM = 1) = 'Y'";
-
- if(i > 1){
- sql = sql + ") ";
- }
- //-----SQL GROUP END---------
-
- //마지막줄이 아닐경우 조건설정
- if(i != grdObjCnt-1){
- if(cond == "NOT") {
- sql = sql + " AND ";
- }else{
- sql = sql + " " + cond +" ";
- }
- }
-
- }
- //한줄도 안들어가있으면 AND안찍기위해서...
- if(fstRowStat != "B"){
- sql = "AND " + sql;
- }*/
-
- } //end for
-
- if(sqlNot != ""){
- var iLen = strTrim(sqlNot).length;
- var rVal = strRight(sqlNot, 3);
- var rVal2 = strRight(sqlNot, 2);
-
- if(rVal == "AND"){
- sqlNot = sqlNot.substring(0, iLen - 3);
- }else if(rVal2 == "OR"){
- sqlNot = sqlNot.substring(0, iLen - 2);
- }
-
- model.setValue("/root/main/cond/n_"+colNm, "AND " + sqlNot);
- }
-
- if(sql != ""){
- var iLen = strTrim(sql).length;
- var rVal = strRight(sql, 3);
- var rVal2 = strRight(sql, 2);
-
- if(rVal == "AND"){
- sql = sql.substring(0, iLen - 3);
- }else if(rVal2 == "OR"){
- sql = sql.substring(0, iLen - 2);
- }
-
- sql = "AND " + sql;
- }
- //한줄도 안들어가있으면 AND안찍기위해서...
- /* if(fstRowStat != "B"){
- sql = "AND " + sql;
- }*/
- } //end if
- return sql;
- }
- function strRight(str, n){
- var iLen = str.length;
- var rVal = str.substring(iLen, iLen - n);
-
- return rVal;
- }
- function strTrim(str){
- return str.replace(/\s+$/g, "");
- }
- function doSrchCondCSV(nodeList, sColSep, sRowSep){
- if( nodeList.length == 0 ){
- return;
- }
-
- var rCSV = "";
- var childNodeList = nodeList.item(0).childNodes;
- var childNodeCnt = childNodeList.length;
- if( childNodeCnt == 0 ){
- return;
- }
-
- var i, j;
- for( i = 0; i < childNodeCnt - 1; i++) {
- rCSV += childNodeList.item(i).nodeName + sColSep;
- }
- rCSV += childNodeList.item(i).nodeName + sRowSep;
-
- var node;
- while( node = nodeList.nextNode() ) {
- childNodeList = node.childNodes;
- for( i = 0; i < childNodeCnt - 1; i++) {
- rCSV += childNodeList.item(i).text + sColSep;
- }
- rCSV += childNodeList.item(i).text + sRowSep;
- }
- return rCSV;
- }
- function doChkSrchCond(){
- var dschfromdd = model.getValue("/root/main/cond/dschfromdd"); // 퇴원일
- var infromdd = model.getValue("/root/main/cond/infromdd"); // 입원일
- var inhospfromdd = model.getValue("/root/main/cond/inhospfromdd"); // 재원일
-
- if(dschfromdd == "" && infromdd == "" && inhospfromdd == ""){
- messageBox("퇴원일, 입원일, 재원일 중 하나는 입력하여야 합니다.", "I999");
- return false;
- }
- return true;
- }
- function doSetSrchCond(){
- //debugger;
- model.setValue("/root/main/cond/cctermcd", fGetCD("grd_cclist", "cctermcd"));
- model.setValue("/root/main/cond/diagtermcd", fGetCD("grd_diagcdlist", "diagtermcd"));
- model.setValue("/root/main/cond/optermcd", fGetCD("grd_opcdlist", "optermcd"));
- model.setValue("/root/main/cond/chngdeptcdlist", fGetCD("grd_chngcdlist", "chngdeptcd"));
- model.setValue("/root/main/cond/diagcd", fGetCD("grd_cnstcdlist", "rectermcd"));
- model.setValue("/root/main/cond/dethcd", fGetCD("grd_directcdlist", "dethcd"));
- model.setValue("/root/main/cond/tophcd", fGetCD("grd_tcdlist", "tophcd"));
- model.setValue("/root/main/cond/morphcd", fGetCD("grd_mcdlist", "morphcd"));
- model.setValue("/root/main/cond/rerntmetstaspartcd", fGetCD("grd_metstascdlist", "rerntmetstaspartcd"));
-
- //수술섹션의 정보를 파악한다.
- var opfromdd = model.getValue("/root/main/cond/opfromdd"); // 수술일
- var opdeptcd = model.getValue("/root/main/cond/opdeptcd"); // 수술과
- var opclsdept = model.getValue("/root/main/cond/opclsdept"); // 분과
- var perfdrid = model.getValue("/root/main/cond/perfdrid"); // 집도의
- if(opfromdd != "" || opdeptcd != "-" || opclsdept != "-" || perfdrid != "" ){ //수술정보 섹션에 데이터 들어가있을 경우
- model.setValue("/root/main/cond/section1", "Y");
- }
-
- //분만섹션의 정보를 파악한다.
- var partrtnfromdd = model.getValue("/root/main/cond/partrtnfromdd"); //분만일
- var womntypecd = model.getValue("/root/main/cond/womntypecd"); // 산모형태
- var stlborncd = model.getValue("/root/main/cond/stlborncd"); //사산여부
- var partrtnkindcd = model.getValue("/root/main/cond/partrtnkindcd"); // 분만형태
- var allwomntypecd = model.getValue("/root/main/cond/allwomntypecd"); // 분만정보만
- if(partrtnfromdd != "" || womntypecd != "-" || stlborncd != "" || partrtnkindcd != "-" || allwomntypecd != ""){
- model.setValue("/root/main/cond/section2", "Y");
- }
-
- //신생아섹션의 정보를 파악한다.
- var prgweekfrom = model.getValue("/root/main/cond/prgweekfrom"); // 임신주수
- var nbabybdwtqtyfrom = model.getValue("/root/main/cond/nbabybdwtqtyfrom"); // 신생아체중
- if(prgweekfrom != "" || nbabybdwtqtyfrom != ""){
- model.setValue("/root/main/cond/section3", "Y");
- }
-
- //전과섹션의 정보를 파악한다.
- var chngdeptfromdd = model.getValue("/root/main/cond/chngdeptfromdd"); //전출일
- var chngdeptcd = model.getValue("/root/main/cond/chngdeptcd"); // 전출과
- var chngclsdept = model.getValue("/root/main/cond/chngclsdept"); // 전출분과
- if(chngdeptfromdd != "" || chngdeptcd != "-" || chngclsdept != "-"){
- model.setValue("/root/main/cond/section4", "Y");
- }
-
- //협진섹션의 정보를 파악한다.
- var cnstreqfromdd = model.getValue("/root/main/cond/cnstreqfromdd"); // 협진의뢰일
- var cnstreqdeptcd = model.getValue("/root/main/cond/cnstreqdeptcd"); // 협진의뢰과
- var cnstclsdept = model.getValue("/root/main/cond/cnstclsdept"); // 분과
- var cnstexecfromdd = model.getValue("/root/main/cond/cnstexecfromdd"); //협진시행일
- var cnstexecdeptcd = model.getValue("/root/main/cond/cnstexecdeptcd"); // 협진 시행과
- var cnstexeclrsdeptcd = model.getValue("/root/main/cond/cnstexeclrsdeptcd"); // 분과
- if(cnstreqfromdd != "" || cnstreqdeptcd != "-" || cnstclsdept != "-" || cnstexecfromdd != "" || cnstexecdeptcd != "-" || cnstexeclrsdeptcd != "-"){
- model.setValue("/root/main/cond/section5", "Y");
- }
-
- //종양, 가코딩 섹션의 정보를 파악한다.
- var cncrflag = model.getValue("/root/main/cond/cncrflag"); // 종양구분
- var tmpcodeyn = model.getValue("/root/main/cond/tmpcodeyn"); // 가코딩
- if(cncrflag != "-" || tmpcodeyn != ""){
- model.setValue("/root/main/cond/section6", "Y");
- }
-
- //암환자관리 섹션의 정보를 파악한다.
- var prmycncryn = model.getValue("/root/main/cond/prmycncryn"); // 다발성 원발암
- var dethyn = model.getValue("/root/main/cond/dethyn"); // 사망여부
- var seer = model.getValue("/root/main/cond/seer"); // SEER
- var staging = model.getValue("/root/main/cond/staging"); // 병기
- var rerntmetstaspart = model.getValue("/root/main/cond/rerntmetstaspart"); // 전이여부
- var ecog = model.getValue("/root/main/cond/ecog"); // ECOG
- var regimen = model.getValue("/root/main/cond/regimen"); // Regimen
- var chosbfcuremthd = model.getValue("/root/main/cond/chosbfcuremthd"); // 내원전치료
- var prmypart = model.getValue("/root/main/cond/prmypart"); // 본원치료(원발)
- var metstaspart = model.getValue("/root/main/cond/metstaspart"); // 본원치료(전이)
-
- if(prmycncryn != "" || dethyn != "" || seer != "-" || staging != "-" || rerntmetstaspart != "" || ecog != "" || regimen != "" || chosbfcuremthd != "" || prmypart != "" || metstaspart != ""){
- model.setValue("/root/main/cond/section7", "Y");
- }
- }
- function doSetNullSrchCond(){
- model.setValue("/root/main/cond/section1", "");
- model.setValue("/root/main/cond/section2", "");
- model.setValue("/root/main/cond/section3", "");
- model.setValue("/root/main/cond/section4", "");
- model.setValue("/root/main/cond/section5", "");
- model.setValue("/root/main/cond/section6", "");
- model.setValue("/root/main/cond/section7", "");
- model.refresh();
- }
- /**
- * @ver : 2009-01-13
- * @desc : 저장된 조건 조회
- * @by : 강지훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function GetCondSave(){
- model.removeNode ("/root/tmp/condlist");
- model.makeNode("/root/tmp/condlist");
-
- submit("TRMRD01602");
- var node = model.instance1.selectSingleNode("/root/tmp/condlist");
- var childNodeList = node.childNodes;
- var childNode;
- while( childNode = childNodeList.nextNode() ) {
- model.setValue("/root/main/cond/" + childNode.nodeName, model.getValue(childNode));
- }
-
- //퇴원과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/dschclsdept") != "-"){
- var deptcd = model.getValue("/root/main/cond/dschdeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_dschclsdept.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_dschclsdept.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_dschclsdept.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_dschclsdept.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_dschclsdept.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_dschclsdept.refresh();
- }
-
- //입원과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/inclsdept") != "-"){
- var deptcd = model.getValue("/root/main/cond/indeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_inclsdept.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_inclsdept.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_inclsdept.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_inclsdept.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_inclsdept.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_inclsdept.refresh();
- }
-
- //수술과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/opclsdept") != "-"){
- var deptcd = model.getValue("/root/main/cond/opdeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_opclsdept.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_opclsdept.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_opclsdept.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_opclsdept.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_opclsdept.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_opclsdept.refresh();
- }
-
- //전출과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/chngclsdept") != "-"){
- var deptcd = model.getValue("/root/main/cond/chngdeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_chngclsdept.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_chngclsdept.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_chngclsdept.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_chngclsdept.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_chngclsdept.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_chngclsdept.refresh();
- }
-
- //협진과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/cnstclsdept") != "-"){
- var deptcd = model.getValue("/root/main/cond/cnstreqdeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_cnstclsdept.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_cnstclsdept.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_cnstclsdept.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_cnstclsdept.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_cnstclsdept.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_cnstclsdept.refresh();
- }
-
- //협진시행과 분과가 비어있지 않으면
- if(model.getValue("/root/main/cond/cnstexeclrsdeptcd") != "-"){
- var deptcd = model.getValue("/root/main/cond/cnstexecdeptcd");
- switch(deptcd){
- case "2010000000":
- cmb_cnstexeclrsdeptcd.choices.itemset.attribute("nodeset") = "/root/init/mdclrsdeptlist/M0500";
- break;
- case "2040000000":
- cmb_cnstexeclrsdeptcd.choices.itemset.attribute("nodeset") = "/root/init/gsclrsdeptlist/M0501";
- break;
- case "2100000000":
- cmb_cnstexeclrsdeptcd.choices.itemset.attribute("nodeset") = "/root/init/gyclrsdeptlist/M0502";
- break;
- case "2110000000":
- cmb_cnstexeclrsdeptcd.choices.itemset.attribute("nodeset") = "/root/init/pdclrsdeptlist/M0503";
- break;
- default:
- cmb_cnstexeclrsdeptcd.choices.itemset.attribute("nodeset") = "/root/init/nulllist/M503";
- break;
- }
- cmb_cnstexeclrsdeptcd.refresh();
- }
-
- model.makeNode("/root/main/diagcdlist");
- model.makeNode("/root/main/cclist");
- model.makeNode("/root/main/chngcdlist");
- model.makeNode("/root/main/directcdlist");
- model.makeNode("/root/main/cnstcdlist");
- model.makeNode("/root/main/opcdlist");
- model.makeNode("/root/main/mcdlist");
- model.makeNode("/root/main/tcdlist");
- model.makeNode("/root/main/metstascdlist");
-
- copyNodesetType("/root/main/diagcdlist", "/root/tmp/diagcdlist" , "replace");
- copyNodesetType("/root/main/cclist", "/root/tmp/cclist" , "replace");
- copyNodesetType("/root/main/chngcdlist", "/root/tmp/chngcdlist" , "replace");
- copyNodesetType("/root/main/directcdlist", "/root/tmp/directcdlist" , "replace");
- copyNodesetType("/root/main/cnstcdlist", "/root/tmp/cnstcdlist" , "replace");
- copyNodesetType("/root/main/opcdlist", "/root/tmp/opcdlist" , "replace");
- copyNodesetType("/root/main/mcdlist", "/root/tmp/mcdlist" , "replace");
- copyNodesetType("/root/main/tcdlist", "/root/tmp/tcdlist" , "replace");
- copyNodesetType("/root/main/metstascdlist", "/root/tmp/metstascdlist" , "replace");
-
- cap_condnm.attribute("text") = "조건명 : " + model.getValue("/root/main/cond/condnm");
- model.refresh();
- }
-
- function getMonthInterval(startdd, enddd){
- var monthcnt = 0;
- while(startdd != enddd){
- startdd = addMonth(startdd);
- monthcnt++;
- }
- return monthcnt;
- }
- function addMonth(yyyymm){
- var yyyy = yyyymm.substring(0, 4);
- var mm = yyyymm.substring(4, 6);
- var bfmm;
-
- if(mm.substr(0,1) == "0"){ //10월 이전인 경우, 앞자리 0을 제거
- bfmm = mm.substr(1,1);
- bfmm++;
-
- }else{ //10월 이후인 경우
- bfmm = mm;
- bfmm++;
- }
-
- if(bfmm > 12){ // 1월 이전을 선택한 경우, 년도를 바꿈
- bfmm = "01";
- yyyy++;
-
- }else if(bfmm < 10){ //10월 이후인 경우에는 앞자리에 0을 붙임.
- bfmm = "0".concat(bfmm);
- }
- return "" + yyyy + "".concat(bfmm);
- }
- function excel_save(){
- //var fileName = window.fileDialog("save", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- var fileName = window.fileDialog("save", "|", true, "", "", "Excel Files(*.xls)|*.xls");
-
- if (fileName != ""){
- iviewer_list.window.javascript.grd_list.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- }
|