12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598 |
- /**
- * 통합검사결과조회 모바일용 js 파일
- * 작성일자 : 2011.05.17 진상찬
- */
- function init()
- {
- if(checkOpener()) {
- document.title ="통합검사결과조회 - "+"[ "+getUserInfo("dutplcenm")+" "+getUserInfo("usernm")+" ]";
- }
- model.setValue("/root/send/data/singdata/srchpid", model.property("pid"));
- model.setValue("/root/send/data/singdata/deptcd", model.property("orddeptcd"));
- model.setValue("/root/send/data/singdata/deptnm", model.property("deptnm"));
- model.setValue("/root/send/data/singdata/drnm", model.property("medispclnm"));
- model.setValue("/root/send/data/singdata/drid", model.property("drid"));
-
- // 조회기준 : [/root/send/data/singdata/listflag]
- // 보고일 : Z
- if ( rdo_statecd.value == "Z" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd"))= false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = false;
-
- // 검사일 : J
- } else if ( rdo_statecd.value == "J" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd")) = false;
-
- // 처방일 : P
- } else if ( rdo_statecd.value == "P" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1"))= false;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = false;
- }
-
- // 이미지 object, 브라우져 object 비활성화
- //document.controls("obj_imge").attribute("visibility") = "hidden";
-
- aezfSetSuppDeptcd();
-
- // 병리에서 사용 근무지 기관코드 가져오기
- model.setValue("/root/send/globalinstance/instance2", getUserInfo("dutplceinstcd") );
-
- /*****************************************************************************************************************************/
- //사용자 환경설정 20081204
- //통합검사결과조회 조회기간(3개월~2년)
- fSetUserTermInit();
- // 조회기간, Combo Box 초기화
- // ipt_date1.value = getCurrentDate();
- // var vRsrvdd = ipt_date1.value ;
- // vRsrvdd = vRsrvdd.toDate("YYYYMMDD");
- // vRsrvdd = vRsrvdd.getAddDate(-90);
- // ipt_date1.value = vRsrvdd.getDateFormat();
- // ipt_date2.value = getCurrentDate();
- // model.setValue("/root/send/data/term", 90);
- /*****************************************************************************************************************************/
-
- cmb_wardcd.select(0);
- cmb_roomcd.select(0);
-
- // LIS 중분류 리스트 조회 조건 설정
- model.setValue("/root/send/codeflag", "0102|");
- //submit("TRAER00823", false); <-- 진상찬 수정 : 검사분류별 누적조회만 가져 오도록 수정
- submit("TRMOB00013", false);
- // 성가요청사항 타이틀 변경 2009.07.09
- model.setValue("/root/init/cmb_basecd/LB0102[1]/nm", " 검사분류별 누적조회");
-
- if ( model.getValue("/root/send/data/singdata/srchpid") != "" ) {
- if ( (model.getValue("/root/send/data/singdata/srchdate11") != "" )
- && (model.getValue("/root/send/data/singdata/srchdate22") != "" )
- && (model.getValue("/root/send/data/singdata/listflag2") != "" ) ) { // 진료요청 , 20080116
- model.setValue("/root/send/data/singdata/srchdate1", model.getValue("/root/send/data/singdata/srchdate11") );
- model.setValue("/root/send/data/singdata/srchdate2", model.getValue("/root/send/data/singdata/srchdate22") );
- model.setValue("/root/send/data/singdata/listflag", model.getValue("/root/send/data/singdata/listflag2") );
- }
- aezfGetSrchPatInfo("1", model.getValue ( "/root/send/data/singdata/srchpid" ), getUserInfo("dutplceinstcd"), "patchosinfo", "/root/main/patinfo/patinfolist" );
-
- //model.setValue("/root/send/data/singdata/chkcheck", "ALL"); // 병리과 버튼 비활서 후 "" 세팅
- // 진상찬 20110517 flag수정 진검만 ALL -> A
- model.setValue("/root/send/data/singdata/chkcheck1", "A");
- //model.refresh();
-
- /*****************************************************************************************************************************/
- //사용자 환경설정 20081204
- //사용자 진료과 전체선택 유무 20081210
- //fSetUserBaseInit();
- fSetUserDeptInit();
- fSetUserTabInit();
- /*****************************************************************************************************************************/
-
- }
-
- // 병리결과 버튼 비활성화여부
- var instance1 = model.getValue("/root/send/globalinstance/instance1");
- model.setValue("/root/send/globalinstance/instance1","1000000000");
- model.setValue("/root/send/grupcdid","S001");
- if (submit("TRAEB00010")) {
- if (model.getValue("/root/main/codelist/item/cdid") == "Y") {
- btn_PathoRsltOld.visible = true;
- }
- }
- model.setValue("/root/send/globalinstance/instance1",instance1);
-
- model.setValue("/root/send/data/singdata/chkcheck", "");
- //model.setFocus("ipt_pid");
-
- // opener 검사 20090727 진료 김소정 선생님 요청.
- // 임상시험 의뢰자 관련하여 [피보험자]라는 화면에서 결과조회를 팝업으로 CALL 할때 다른 등록번호를 조회할 수 없도록.
- if(checkOpener()) {
- var authflagpid = opener.javascript.getParameter("opener_parameter_id"); //opener parameter value를 get
- var authflag = opener.javascript.getParameter("opener_parameter_authflag"); //opener parameter value를 get
- if (authflag == "N"){
- //alert("임상시험 피보험자 화면에서 Call");
- ipt_pid.disabled = true; // 등록번호 입력란
- button5.visible = false; // 이름 검색버튼
- btn_MyPatList.visible = false; // 대상자조회 버튼
- button40.visible = false; // 출력 버튼
- button1.visible = false; // 엑셀 버튼
-
- model.setValue("/root/send/data/singdata/srchpid", authflagpid);
- aezfGetSrchPatInfo("1", model.getValue ( "/root/send/data/singdata/srchpid" ), getUserInfo("dutplceinstcd"), "patchosinfo", "/root/main/patinfo/patinfolist" );
-
- model.makeNode("/root/hidden/patinfo/patinfolist");
- copyNodesetType("/root/hidden/patinfo/patinfolist", "/root/main/patinfo/patinfolist" , "replace");
- }
- }
-
- model.refresh();
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자 환경설정 tab 세팅
- */
- function fSetUserTabInit(){
- var chkbutton = "A";
-
- //var AnswData = fGetIntefeAnsw("002");
- //2011-05-27 진상찬: 분류별로 고정
- var AnswData = "분류별";
-
- if(AnswData != "" ) {
- if( AnswData == "분류별" ){
- btn_case1.selected = true;
- if ( chkbutton == "A" ){
- fGetHemoDailyList();
- }else if ( chkbutton == "B" ) {
- fGetPlgyDailyList();
- }else if ( chkbutton == "C" ) {
- fGetPhotDailyList();
- }else if ( chkbutton == "D" ) {
- fGetNuclDailyList();
- }else if ( chkbutton == "E" ) {
- fGetColonyDailyList();
- }else if ( chkbutton == "F" ) {
- fGetFuncDailyList();
- }else if ( chkbutton == "G" ) {
- fGetCellDailyList();
- }else {
- btn_case1.dispatch("DOMActivate");
- model.toggle("case1");
- }
- }
-
- }else{
- if ( chkbutton == "ALL" ) {
- fGetSytsRsltRefList("ALL","B");
- }
- }
- }
- /* SET 관련 FUNCTION END */
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 결과 조회 진단검사 연속보기 Function
- */
- function fGetHemoDailyList() {
- model.setValue("/root/send/data/singdata/chkcheck1", "A");
- fcheckyn2('A');
- // 2011-05-27 진상찬: 조회 버튼 이벤트로 수정
- btn_srch.dispatch("DOMActivate");
- //fGetSytsRsltRefList("A","B");
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 검사구분을 Check 하기 위한 Function
- */
- function fcheckyn2(gubn) {
- switch (gubn) {
-
- case "A" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck2", ""); model.setValue("/root/send/data/singdata/chkcheck3", "");
- model.setValue("/root/send/data/singdata/chkcheck4", ""); model.setValue("/root/send/data/singdata/chkcheck5", "");
- model.setValue("/root/send/data/singdata/chkcheck6", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "B" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck3", "");
- model.setValue("/root/send/data/singdata/chkcheck4", ""); model.setValue("/root/send/data/singdata/chkcheck5", "");
- model.setValue("/root/send/data/singdata/chkcheck6", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "C" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck2", "");
- model.setValue("/root/send/data/singdata/chkcheck4", ""); model.setValue("/root/send/data/singdata/chkcheck5", "");
- model.setValue("/root/send/data/singdata/chkcheck6", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "D" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck2", "");
- model.setValue("/root/send/data/singdata/chkcheck3", ""); model.setValue("/root/send/data/singdata/chkcheck5", "");
- model.setValue("/root/send/data/singdata/chkcheck6", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "E" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck2", "");
- model.setValue("/root/send/data/singdata/chkcheck3", ""); model.setValue("/root/send/data/singdata/chkcheck4", "");
- model.setValue("/root/send/data/singdata/chkcheck6", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "F" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck2", "");
- model.setValue("/root/send/data/singdata/chkcheck3", ""); model.setValue("/root/send/data/singdata/chkcheck4", "");
- model.setValue("/root/send/data/singdata/chkcheck5", ""); model.setValue("/root/send/data/singdata/chkcheck7", ""); break;
- case "G" :
- model.setValue("/root/send/data/singdata/chkcheck","");
- model.setValue("/root/send/data/singdata/chkcheck1", ""); model.setValue("/root/send/data/singdata/chkcheck2", "");
- model.setValue("/root/send/data/singdata/chkcheck3", ""); model.setValue("/root/send/data/singdata/chkcheck4", "");
- model.setValue("/root/send/data/singdata/chkcheck5", ""); model.setValue("/root/send/data/singdata/chkcheck6", ""); break;
- default : break;
- }
- }
-
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 분류별/그룹별의 분류버튼들의 우선 조회순위 기준 세팅
- */
- function fSetUserSeriesButtonInit(){
-
- var AnswData = fGetIntefeAnsw("012");
-
- if(AnswData != "" ) {
-
- if( AnswData == "전체" ){
- return "ALL";
- }
- if( AnswData == "진검" ){
- return "A";
- }
- if( AnswData == "병리" ){
- return "B";
- }
- if( AnswData == "영상" ){
- return "C";
- }
- if( AnswData == "핵체외" ){
- return "D";
- }
- if( AnswData == "내시경" ){
- return "E";
- }
- if( AnswData == "기능" ){
- return "F";
- }
- if( AnswData == "미생물" ){
- return "G";
- }
-
- }else {
- return "ALL";
- }
-
- }
-
- /**
- * 세션 GET
- */
- function aezfSetSuppDeptcd() {
- var dutplcecd = getUserInfo("dutplcecd");
-
- //var selectplcecd = getScreenPrestDeptCd();
- var selectplcecd = "";
-
- if ( selectplcecd == "" ) {
- selectplcecd = dutplcecd;
- //selectplcenm = dutplcenm;
- }
-
- model.setValue("/root/send/globalinstance/instance1", selectplcecd);
- }
-
- /**
- * @desc : 통합결과조회
- * @
- * @param :
- * @return :
- * @authur : 김건기 2009.07.14
- * @---------------------------------------------------
- */
- function fGetSytsRsltRefList(chkcheck, srchflag){
- model.setValue("/root/send/data/singdata/chkcheck", chkcheck);
-
- // 분류별
- if (srchflag == "B") {
-
- model.toggle("case1");
-
- if (chkcheck == "A") {
- datagrid2.visible = false;
- //grd_subresultdetail1.visible = false;
- //2011-05-25 진검검사에서 그리드 보이도록 수정
- grd_subresultdetail1.visible = true;
- } else {
- datagrid2.visible = false;
- grd_subresultdetail1.visible = true;
- }
-
- //fGetWideListX1(switch1, grd_maindaily);
- fGetWideListX1(grd_maindaily);
-
- // 조건 체크
- var check = fGetMainListCondiCheck_Case1();
- if ( check == "0" ) return true;
-
- if ( model.getValue("/root/send/data/singdata/chkcheck") == "ALL" ) {
- fcheckyn();
- }
-
- // Grid 초기화
- fInitGrid();
-
- // Progress Start
- //openLoadingBar();
-
- // 환자정보
- // 2011-05-27 진상찬: 화면 로드시 환자정보를 가져오기에 주석처리
- //fGetMainSrchPatInfo();
-
- model.setValue("/root/send/data/singdata/srchflag", srchflag);
- submit("TRAER00830",false);
-
- model.makeNode("/root/main/patinfo/patinfolist");
- copyNodesetType("/root/main/patinfo/patinfolist", "/root/hidden/patinfo/patinfolist" , "replace");
- //model.refresh();
-
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
-
- // 일자별 전체조회일경우만 기준일자 조회
- if ( srchLength1 > 0 ) {
- var orddd = model.getValue("/root/main/baseorddd/initorddd/orddd");
- var gubun = model.getValue("/root/main/baseorddd/initorddd/gubun");
-
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
-
- // Grid Background Color Clear
- for ( var i = 1; i <= srchLength1; i++ ) {
- grd_maindaily.rowStyle( i , "data" , "background-color" ) = "#ffffff";
- }
-
- for ( var i = 1; i <= srchLength1; i++ ) {
- // 전자서명번호가 존재하면 색상을 변경한다. 즉, 사본출력가능한 처방이면서 원래 서식모양으로 보여주기 위해, 20080214
- if ( model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno") == "") {
- var signno = 0;
- }else {
- var signno = parseInt(model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno"));
- }
- if ( signno > 0 ) {
-
- grd_maindaily.rowStyle( i , "data" , "background-color" ) = "#b9e5fb";
-
- }
- }
-
- // 1. execprcpuniqno가 0이 아니면서(검사/치료만적용)
- // 2. Signno가 동일 값이면
- // => 다중처방 단일서식이기에 결과내역은 한 건만 조회되게 한다.
- var flag = "N";
- for ( var i = 1; i <= srchLength1; i++ ) {
-
- var execprcpuniqno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/execprcpuniqno");
- var signno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno");
-
- if ( execprcpuniqno != "0" && signno != "0" && signno != "" ) {
-
- for ( var j = 1; j <= srchLength1; j++ ) {
-
- var vsignno = model.getValue("/root/main/ordlist1/maindailylist[" + j + "]/signno");
- if ( i != j && signno == vsignno ) {
- // 다중 처방이면서 단일서식 결과가 존재합니다
- model.setValue("/root/main/ordlist1/maindailylist[" + j + "]/check", "N");
- flag = "Y";
- }
-
- }
- }
-
- if ( flag == "Y" ) break;
-
- }
- model.refresh();
-
- // 기본설정 기능으로 결과상세조회할 지 의 여부를 판단한다. 20090109
- fGetResultContinueListInit1();
-
- // 날짜별 정렬
- //fSort();
- } else {
- model.refresh();
- }
- // Progress End
- //closeLoadingBar();
-
- // 그룹별
- } else if (srchflag == "G") {
- model.toggle("case5");
-
- if (chkcheck == "A") {
- datagrid2.visible = false;
- grp_makedset.visible = false;
- grd_subresultdetail1.visible = false;
- grd_subresultdetail2.visible = true;
- } else {
- datagrid2.visible = false;
- grp_makedset.visible = false;
- grd_subresultdetail2.visible = false;
- grd_subresultdetail1.visible = true;
- }
-
-
- //fGetWideListX1(switch1, grd_maindaily);
- fGetWideListX1(grd_maindaily);
-
- // 조건 체크
- var check = fGetMainListCondiCheck_Case1();
- if ( check == "0" ) return true;
-
- if ( model.getValue("/root/send/data/singdata/chkcheck") == "ALL" ) {
- fcheckyn();
- }
- // Grid 초기화
- fInitGrid();
-
- // Progress Start
- //openLoadingBar();
-
- // 환자정보
- // 2011-05-27 진상찬: 화면 로드시 환자정보를 가져오기에 주석처리
- //fGetMainSrchPatInfo();
-
- model.setValue("/root/send/data/singdata/srchflag", srchflag);
- submit("TRAER00830",false);
-
- model.makeNode("/root/main/patinfo/patinfolist");
- copyNodesetType("/root/main/patinfo/patinfolist", "/root/hidden/patinfo/patinfolist" , "replace");
-
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
- var cnt = 0;
- // 일자별 전체조회일경우만 기준일자 조회
- if ( srchLength1 > 0 ) {
- var orddd = model.getValue("/root/main/baseorddd/initorddd/orddd");
- var gubun = model.getValue("/root/main/baseorddd/initorddd/gubun");
-
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
-
- // Grid Background Color Clear
- for ( var i = 1; i <= srchLength1; i++ ) {
- datagrid1.rowStyle( i , "data" , "background-color" ) = "#ffffff";
- }
-
- // 전자서명번호가 존재하면 색상을 변경한다. 즉, 사본출력가능한 처방이면서 원래 서식모양으로 보여주기 위해, 20080214
- for ( var i = 1; i <= srchLength1; i++ ) {
- if ( model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno") == "") {
- var signno = 0;
- }else {
- var signno = parseInt(model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno"));
- }
- if ( signno > 0 ) {
- datagrid1.rowStyle( i , "data" , "background-color" ) = "#b9e5fb";
- }
- }
-
-
- // 1. execprcpuniqno가 0이 아니면서(검사/치료만적용)
- // 2. Signno가 동일 값이면
- // => 다중처방 단일서식이기에 결과내역은 한 건만 조회되게 한다.
- var flag = "N";
- for ( var i = 1; i <= srchLength1; i++ ) {
-
- var execprcpuniqno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/execprcpuniqno");
- var signno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno");
-
- //alert(execprcpuniqno);
-
- if ( execprcpuniqno != "0" && signno != "0" && signno != "" ) {
-
- for ( var j = 1; j <= srchLength1; j++ ) {
-
- var vsignno = model.getValue("/root/main/ordlist1/maindailylist[" + j + "]/signno");
- //alert('i->' + i + ', j->' + j + ', signno->' + signno + ', vsignno->' + vsignno);
-
- if ( i != j && signno == vsignno ) {
- model.setValue("/root/main/ordlist1/maindailylist[" + j + "]/check", "N");
- flag = "Y";
- }
-
- }
- }
-
- if ( flag == "Y" ) break;
-
- }
- model.refresh();
-
- // 기본설정 기능으로 결과상세조회할 지 의 여부를 판단한다. 20090109
- fGetResultContinueListInit2();
-
- // 날짜별 정렬
- fSort2();
- } else {
- model.refresh();
- }
-
- // Progress End
- //closeLoadingBar();
-
- // SET별
- } else if (srchflag == "S") {
-
- // SET전체항목조회 비활성화
- grp_makedset.visible = false;
- datagrid2.visible = true;
- grd_subresultdetail1.visible = false;
- model.setValue("/root/send/setdata/setkindcd", "D");
-
- // 진행상태
- } else if (srchflag == "P") {
-
- // 조건 체크
- var check = fGetMainListCondiCheck_Case4();
- if ( check == "0" ) return true;
-
- }
-
- }
- /**
- * @desc : interface answer 조회
- * @
- * @param :
- * @return :
- * @author : Moonsh
- * @---------------------------------------------------
- */
- function fGetIntefeAnsw(qestcd){
- // 조회 변수 조회
- model.setValue("/root/send/interqestcd", qestcd);
-
- submit("TRMMB01104");
- var answvalnm = model.getValue("/root/main/interface/answvalnm");
- //KNUH_20110208, 주희경, 로그인 시 미리 데이터를 조회해 놓고 copy해서 쓰는 방식으로 변경
- //var viewerObj = getViewer("sysMessage");
- //var answvalnm = viewerObj.window.model.getValue(gvOrderBasicInfoPath +"/interface[qestcd='"+qestcd+"']/answvalnm");
- return answvalnm ;
- }
- function aezfGetSrchPatInfo(cond1, cond2, cond3, cond99, rtnXpath) {
-
- model.makeValue ( "/root/send/cond1", cond1 );
- model.makeValue ( "/root/send/cond2", cond2 );
- model.makeValue ( "/root/send/cond3", cond3 );
- model.makeValue ( "/root/send/cond99", cond99 );
- if (!submit ( "TRMMO02501",false )) {
- model.resetInstanceNode (rtnXpath );
- model.refresh();
- return "0";
- }else {
- return "1";
- }
-
- }
- /************************************************************************************************
- *
- * aezfGridSetColor
- @param
- * path : 목적그리드
- * chkcol : 목적ColRef
- * chkval : 비교value
- * imagename : ImageName
- * desc : Background Image check.
- *************************************************************************************************/
- function aezfGridSetColor(path, chkcol, chkval, imagename ) {
- //alert('IN');
- var srchLength1 = model.instances(0).selectNodes( path ).length;
- for ( var i = 1; i <= srchLength1; i++ ) {
- if ( model.getValue ( path+"["+ i +"]/"+chkcol ) == chkval ) {
- grd_subresultdetail1.rowStyle(i, "data", "background-image") = "../../../com/commonweb/images/"+imagename;
- grd_subresultdetail1.rowStyle(i, "data", "background-repeat") = "repeat-x";
- //grd_subresultdetail1.rowStyle(i, "data", "text-align") = "center";
- } else {
- grd_subresultdetail1.rowStyle(i, "data", "background-image") = "";
- //grd_subresultdetail1.rowStyle(i, "data", "text-align") = "left";
- }
- }
- }
- function aezfSetFontRowStyle( gridID , styleFlag , data , colRef , control ) {
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" ,
- "blue" ,
- "#c8e67b" ,
- "green" ,
- "#ff9933" ,
- "red" ,
- "#9999cc",
- "#5A5A5A",
- "#000000"
- );
- var styleFlags = styleFlag.split("^");
- var datas = data.split("^");
-
- if( control == null || control == "" )
- control = "equal";
-
- var controls = control.split("^");
- gridObj = document.all(gridID);
- gridObj.backcoloralternate = "transparent";
-
- for( var j = 0 ; j < datas.length ; j++ ) {
-
- var dataValue = datas[j];
- var styleValue = style[styleFlags[j]];
-
- for( var i = gridObj.fixedRows ; i < gridObj.rows ; i++ ) {
-
- if(controls[j] == null)
- controls[j] = "equal";
-
- switch( controls[j] ) {
- case "small":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) < dataValue ) {
-
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "smallThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) <= dataValue ) {
-
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "bigger":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) > dataValue ) {
-
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "biggerThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) >= dataValue ) {
-
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- /*
- case "notEqual":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) != dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- */
- case "equalBold":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- case "equal":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowStyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowStyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- }
- }
- }
-
- }
- /************************************************************************************************
- 함수명 : setrowStyle ()
- 인자 :
- String gridID - 그리드 아이디
- String styleFlag - 컬러 인덱스
- String data - 데이터 값
- Srting colRef - 비교할 컬럼 Ref
- String [control] - 조건 smaller | smallerThen | equal | biggerThen | bigger
- 결과값 :
- 함수설명 : 그리드 특정 컬럼값을 비교하여 로우 백컬러 변경
- * 사용예) setrowStyle("datagrid1", "1", "1", "b", "bigger");
- ************************************************************************************************
- 작 성 자 : 어 승옥
- 작 성 일 : 2006. 12. 01
- ************************************************************************************************/
- function aezfSetRowStyle( gridID , styleFlag , data , colRef , control ) {
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" ,
- "#43c8f5" , "#ff9933" , "#3399ff" , "#9999cc" , "#FFC8C8" , "#fab7bf" , "#ffff00" , "#ccffcc" , "#FF9A00");
- var styleFlags = styleFlag.split("^");
- var datas = data.split("^");
-
- if( control == null || control == "" )
- control = "equal";
-
- var controls = control.split("^");
- gridObj = document.all(gridID);
- gridObj.backcoloralternate = "transparent";
-
- for( var j = 0 ; j < datas.length ; j++ ) {
-
- var dataValue = datas[j];
- var styleValue = style[styleFlags[j]];
-
- for( var i = gridObj.fixedRows ; i < gridObj.rows ; i++ ) {
-
- if(controls[j] == null)
- controls[j] = "equal";
-
- switch( controls[j] ) {
- case "small":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) < dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "smallThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) <= dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "bigger":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) > dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "biggerThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) >= dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- /*
- case "notEqual":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) != dataValue ) {
-
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- */
- case "equal":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowStyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- }
- }
- }
-
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 진검분류별 누적 조회 Function
- */
- function fGetNSeriesResultRef(){
-
- var vText = model.getValue("/root/send/data/singdata/srchpid");
-
-
- if(vText == "" ){
-
- messageBox("등록번호를","C001","") ;
- return;
- }
-
- fInitDatagrid2();
-
- // 환자정보
- fGetMainSrchPatInfo();
-
- // LIS Map File을 적용하기 위해 세팅한다.
- model.setValue("/root/send/setdata/startdd", model.getValue("/root/send/data/singdata/srchdate1"));
- model.setValue("/root/send/setdata/enddd", model.getValue("/root/send/data/singdata/srchdate2"));
- model.setValue("/root/send/setdata/pid", model.getValue("/root/send/data/singdata/srchpid"));
-
- model.setValue("/root/send/setdata/setno", "");
- model.setValue("/root/send/setdata/tclscdlist", cmb_mdl.value);
- model.setValue("/root/send/setdata/workflag", "1");
-
- //2011.05.01진상찬 페이지 처리추가(10건씩)
- var offset = parseInt(model.getValue("root/page3/curpage"));
- //1page면 offset은 0, 1page가 아니면 offset은 page수 * 10 (한페이지당 10건씩 보여줌)
- if(offset == 1)
- {
- offset = offset - 1;
- }
- else
- {
- offset = (offset - 1) * 10;
- }
-
- model.removenode("/root/send/setdata/offset");
- model.removenode("/root/send/setdata/pagesize");
- model.makeValue("/root/send/setdata/offset", String(offset)); //몇번째 데이터 부터 조회할지 지정
- model.makeValue("/root/send/setdata/pagesize", model.getValue("/root/page3/pagesize")); //한페이지에 보여줄 건수(10건고정)
-
- //submit("TRLLP01201" , false);
- submit("TRMOB00017", false);
-
- var maxpage = parseInt(model.getValue("/root/hidden/temp/rsltlist/getacmltestlist2cnt/maxcnt"));
-
- if(maxpage < 10)
- {
- model.setValue("/root/page3/maxpage", "1");
- }
- else
- {
- maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1;
- model.setValue("/root/page3/maxpage", String(maxpage));
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////
-
- var gridCaption = model.getValue("/root/hidden/temp/rsltlist/header/caption");
-
- if(gridCaption == "") return;
- //ref 정보
- var gridColRef = model.getValue("/root/hidden/temp/rsltlist/header/colref");
- var gridColRefArray = gridColRef.split("^");
-
- var gridColType = model.getValue("/root/hidden/temp/rsltlist/header/type");
-
-
- var gridColTypeArray = gridColType.split("^");
-
-
- //for( var i = 0; i < gridColRefArray.length; i++ ) {
- for( var i = 1; i < gridColRefArray.length; i++ ) {
- datagrid2.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; ", false);
-
- }
- // datagrid2.colWidth(1) = 22;
- // datagrid2.colWidth(2) = 100;
- // datagrid2.colWidth(3) = 80;
- // datagrid2.colWidth(4) = 80;
- datagrid2.rowHeight(0) = 35;
-
- var col = datagrid2.cols;
-
- // for( i = 5; i < datagrid2.cols; i++ ) {
-
- // datagrid2.colWidth(i) = 80;
- // }
-
- var node = instance1.selectSingleNode("/root/main");
- //node.replaceChild(instance1.root.hidden.temp.rsltlist, instance1.root.main.rsltlist);
- node.replaceChild(instance1.selectSingleNode("/root/hidden/temp/rsltlist"), instance1.selectSingleNode("/root/main/rsltlist"));
- //datagrid2.fixedcellcheckbox(0,1)=true;
- model.refresh();
- var algridCaption = gridCaption.split("^");
- algridCaption.shift();
- gridCaption = algridCaption.join("^");
-
- datagrid2.caption = gridCaption;
-
- fReMake();
-
- }
- function fInitDatagrid2() {
- var cols = datagrid2.cols-datagrid2.fixedCols;
- var rows = datagrid2.rows-datagrid2.fixedRows;
-
- for( var i = 0; i < cols; i++ ) {
- datagrid2.removeColumn(false);
- }
-
- // for( var i = 0; i < rows; i++ ) {
- // datagrid2.removeRow(false);
- // }
-
- model.removeNodeset("/root/main/rsltlist");
-
- model.makeNode("/root/main/rsltlist/row");
- model.refresh();
- }
- function fReMake(){
- xx = 0;
- //alert(model.getValue("/root/main/rsltlist/row["+9+"]/judg0"))
- for(i=1;i<datagrid2.rows;i++){
- for(j=5;j<datagrid2.cols;j++){
-
- var vJudg = model.getValue("/root/main/rsltlist/row["+i+"]/judg" + xx);
- if(vJudg == "H"){
- datagrid2.cellStyle("color",i,j,i,j) = "red";
- }
- else if(vJudg == "L"){
- datagrid2.cellStyle("color",i,j,i,j) = "blue";
- }
- xx ++;
- }
- xx = 0;
- }
- }
- function fSort() {
-
- grd_maindaily.rebuild();
-
- var listflag = model.getValue("/root/send/data/singdata/listflag");
- var col = 0;
-
- if (listflag == "P") {
- col = grd_maindaily.colRef("prcpdd1");
- } else if (listflag == "J") {
- //col = grd_maindaily.colRef("prcpdd1");
- col = grd_maindaily.colRef("execdd1");
- } else {
- col = grd_maindaily.colRef("lastreptdd");
- }
-
- grd_maindaily.colSort(col) = "desc";
- grd_maindaily.sort(1, col, grd_maindaily.rows-1, grd_maindaily.cols-1) = "usersort";
- grd_maindaily.gridToInstance();
-
- }
- function fSort2() {
-
- var listflag = model.getValue("/root/send/data/singdata/listflag");
- var col = 0;
-
- if (listflag == "P") {
-
- } else if (listflag == "J") {
- //col = datagrid1.colRef("prcpdd1");
-
- } else {
-
- }
-
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 병실정보 조회를 위한 Function
- */
- function fChngSrchRoomCd() {
-
- if ( model.getValue("/root/send/data/singdata/wardcd") == "" ) return;
- //alert(cmb_wardcd.value);
- //alert(model.getValue("/root/send/data/singdata/wardcd"));
- model.resetInstanceNode("/root/init/cmb_room/initexecroom");
- submit("TRAER00802");
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 검사구분을 Check 하기 위한 Function
- */
- function fcheckyn() {
- if ( model.getValue("/root/send/data/singdata/chkcheck") == "ALL" ) {
-
- model.setValue("/root/send/data/singdata/chkcheck1",""); model.setValue("/root/send/data/singdata/chkcheck2","");
- model.setValue("/root/send/data/singdata/chkcheck3",""); model.setValue("/root/send/data/singdata/chkcheck4","");
- model.setValue("/root/send/data/singdata/chkcheck5",""); model.setValue("/root/send/data/singdata/chkcheck6","");
- model.setValue("/root/send/data/singdata/chkcheck7",""); model.setValue("/root/send/data/singdata/chkcheck8","");
- }
- //model.refresh();
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 조건 일자별 메인조회를 위한 조건체크 Function
- */
- function fGetMainListCondiCheck_Case1() {
- if ( model.getValue("/root/send/data/singdata/srchpid") == "" ) {
-
- // 경고창 뜨지 않게 체크함. 20081230, 장준원
- //messageBox("[조회필수항목-등록번호]는 필수입력 항목입니다.","I999");
- model.setfocus( "ipt_pid" );
- return "0";
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 조건 진행상태별 메인조회를 위한 조건체크 Function
- */
- function fGetMainListCondiCheck_Case4() {
-
- if ( model.getValue("/root/send/data/singdata/srchpid") == "" ) {
- // 경고창 뜨지 않게 체크함. 20081230, 장준원
- //messageBox("[조회필수항목-등록번호]는 필수입력 항목입니다.","I999");
- model.setfocus( "ipt_pid" );
- return "0";
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 조건 메인 일자별 처방일기준 조회 Function
- */
- function fGetMainDistinctDailyList() {
- datagrid2.visible = false;
- grd_subresultdetail1.visible = true;
-
- //fGetWideListX1(switch1, grd_maindaily);
-
- fGetWideListX1(grd_maindaily);
-
- // 조건 체크
- var check = fGetMainListCondiCheck_Case1();
- if ( check == "0" ) return true;
-
- if ( model.getValue("/root/send/data/singdata/chkcheck") == "ALL" ) {
- fcheckyn();
- }
-
- // Grid 초기화
- fInitGrid();
-
- model.setValue("/root/send/data/singdata/tabflag","distinctdaily");
- //alert('IN->'+model.getValue("/root/send/data/singdata/chkcheck"));
-
- //model.refresh();
- //20110517 진상찬 진검만 조회되도록 고정
- model.setValue("/root/send/data/singdata/chkcheck1", "A");
- //submit("TRAER00812");
-
- submit("TRMOB00014");
-
- }
- /* @group : 접수관리(진단방사선)
- * @ver : 2007.03.21
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : Grid초기화 Function
- */
- function fInitGrid() {
- model.resetInstanceNode("/root/main/ordlist1/maindailylist");
- model.resetInstanceNode("/root/main/ordlist2/mainserious");
- model.resetInstanceNode("/root/main/ordlist5/mainseriouslist");
- model.resetInstanceNode("/root/main/ordlist3/mainset");
- model.resetInstanceNode("/root/main/ordlist4/mainprogress");
- model.resetInstanceNode("/root/main/subordlist1/subresultdetail1");
-
- // 일자별 조회만 적용. 20080727 , 장준원
- //alert(rdo_statecd.value);
- if ( btn_case1.selected == true ) {
-
- // 보고일 기준
- if ( rdo_statecd.value == "Z" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = false;
-
- // 검사일 기준
- } else if ( rdo_statecd.value == "J" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1")) =true;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd")) = false;
- // 처방일 기준
- } else if ( rdo_statecd.value == "P" ) {
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("prcpdd")) = true;
-
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("lastreptdd1")) = false;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd1")) = true;
- grd_maindaily.colHidden(grd_maindaily.colRef("execdd")) = false;
- }
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 조건 메인 일자별조회 Function
- */
- function fGetMainDailyList() {
- btn_case1.selected = true; //taebum
- model.toggle("case1");
- datagrid2.visible = false;
- grd_subresultdetail1.visible = true;
-
- // 조건 체크
- var check = fGetMainListCondiCheck_Case1();
- if ( check == "0" ) return true;
-
- if ( model.getValue("/root/send/data/singdata/chkcheck") == "ALL" ) {
- fcheckyn();
- }
- // Grid 초기화
- fInitGrid();
-
- // Progress Start
- //openLoadingBar();
- // 환자정보
- fGetMainSrchPatInfo();
-
- model.setValue("/root/send/data/singdata/tabflag","daily");
- //alert('IN->'+model.getValue("/root/send/data/singdata/chkcheck"));
-
- //20110517 진상찬 진검만 조회되도록 고정
- model.setValue("/root/send/data/singdata/chkcheck1", "A");
- //2011.05.01진상찬 페이지 처리추가(10건씩)
- var offset = parseInt(model.getValue("root/page/curpage"));
- //1page면 offset은 0, 1page가 아니면 offset은 page수 * 10 (한페이지당 10건씩 보여줌)
- if(offset == 1)
- {
- offset = offset - 1;
- }
- else
- {
- offset = (offset - 1) * 10;
- }
- model.removenode("/root/send/maindata/offset");
- model.removenode("/root/send/maindata/pagesize");
- model.makeValue("/root/send/data/singdata/offset", String(offset)); //몇번째 데이터 부터 조회할지 지정
- model.makeValue("/root/send/data/singdata/pagesize", model.getValue("root/page/pagesize")); //한페이지에 보여줄 건수(10건고정)
- //submit("TRAER00806", false);
- submit("TRMOB00015", false);
-
- var maxpage = parseInt(model.getValue("/root/main/ordlist1/maindailylistcnt/maxcnt"));
- if(maxpage < 10)
- {
- model.setValue("/root/page/maxpage", "1");
- }
- else
- {
- maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1;
- model.setValue("/root/page/maxpage", String(maxpage));
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
- //var cnt = 0;
- // 일자별 전체조회일경우만 기준일자 조회
- if ( srchLength1 > 0 ) {
- submit("TRAER00811");
-
- var orddd = model.getValue("/root/init/baseorddd/initorddd/orddd");
- var gubun = model.getValue("/root/init/baseorddd/initorddd/gubun");
-
- var srchLength1 = model.instances(0).selectNodes( "/root/main/ordlist1/maindailylist" ).length;
-
- // Grid Background Color Clear
- for ( var i = 1; i <= srchLength1; i++ ) {
- grd_maindaily.rowStyle( i , "data" , "background-color" ) = "#ffffff";
- }
-
- for ( var i = 1; i <= srchLength1; i++ ) {
- // 전자서명번호가 존재하면 색상을 변경한다. 즉, 사본출력가능한 처방이면서 원래 서식모양으로 보여주기 위해, 20080214
- if ( model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno") == "") {
- var signno = 0;
- }else {
- var signno = parseInt(model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno"));
- }
- if ( signno > 0 ) {
-
- grd_maindaily.rowStyle( i , "data" , "background-color" ) = "#b9e5fb";
-
- }
- }
- // 기본설정 기능으로 결과상세조회할 지 의 여부를 판단한다. 20090109
- //var rtncnt = fGetResultContinueListInit1();
-
- // 1. execprcpuniqno가 0이 아니면서(검사/치료만적용)
- // 2. Signno가 동일 값이면
- // => 다중처방 단일서식이기에 결과내역은 한 건만 조회되게 한다.
- var flag = "N";
- for ( var i = 1; i <= srchLength1; i++ ) {
-
- var execprcpuniqno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/execprcpuniqno");
- var signno = model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/signno");
-
- //alert(execprcpuniqno);
-
- if ( execprcpuniqno != "0" && signno != "0" && signno != "" ) {
-
- for ( var j = 1; j <= srchLength1; j++ ) {
-
- var vsignno = model.getValue("/root/main/ordlist1/maindailylist[" + j + "]/signno");
- //alert('i->' + i + ', j->' + j + ', signno->' + signno + ', vsignno->' + vsignno);
-
- if ( i != j && signno == vsignno ) {
- //alert('다중 처방이면서 단일서식 결과가 존재합니다. 테스트중입니다!!');
- model.setValue("/root/main/ordlist1/maindailylist[" + j + "]/check", "N");
- flag = "Y";
- }
-
- }
- }
-
- if ( flag == "Y" ) break;
-
- }
- model.refresh();
-
- // 기본설정 기능으로 결과상세조회할 지 의 여부를 판단한다. 20090109
- fGetResultContinueListInit1();
-
- // 날짜별 정렬
- //fSort();
- }
-
- // 20080727, 장준원
- // 조회기준이 보고or검사일 : 처방일자 <-> 보고일자
- // 조회기준이 처방일 : 보고일자<->처방일자
-
- // Progress End
- //closeLoadingBar();
- //closeLoadingBar();
- }
- function fInitial_subordlist() {
- model.removeNodeset("/root/main/subordlist1/subresultdetail1"); // 결과내역
- model.removeNodeset("/root/main/subordlist2/subresultdetail1"); // 결과내역
- model.removeNodeset("/root/send/maindata"); // 일자별 그리드
- model.makeNode("/root/send/maindata");
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : Daily , Serious 결과 내역 그리드 Setting Function
- */
- function fSetSubDetailGrid()
- {
- ////////////////////////////
- // 결과내역 그리드 세팅한다//
- ////////////////////////////
- // 체크박스 미사용(전에조회에사용된 세팅을 해제하기 위해) 해제
- // 진검의 L,H에 적용한 색상 해제 ,
- var srchLength1 = model.instances(0).selectNodes( "/root/main/subordlist1/subresultdetail1" ).length;
- for ( var i = 1; i <= srchLength1; i++ ) {
- //grd_subresultdetail1.isReadOnly(i, 0, i, 1) = false; // 체크박스 미사용 해제
- grd_subresultdetail1.rowStyle( i , "data" , "background-color" ) = "#FFFFFF";
- grd_subresultdetail1.rowStyle( i , "data" , "color" ) = "#000000";
- }
-
- //model.refresh();
-
- // 타이틀 색상 정의, 진검, 검사치료, 병리에 적용 (T)
- aezfGridSetColor( "/root/main/subordlist1/subresultdetail1", "judgmark", "T", "tab_hide.gif");
-
- // 타이틀 글자 색상 정의, 진검, 검사치료, 병리에 적용 (T)
- aezfSetFontRowStyle("grd_subresultdetail1" , "15" , "T" , "judgmark" );
-
-
- // 병리의 중간결과(P)에 적용
- aezfSetRowStyle("grd_subresultdetail1" , "5" , "P" , "judgmark" );
- // 병리의 중간결과(Q)에 적용
- aezfSetRowStyle("grd_subresultdetail1" , "12" , "Q" , "judgmark" );
-
- //alert('1');
- // 진검&병리의 L,H에 적용
- aezfSetFontRowStyle("grd_subresultdetail1" , "7" , "L" , "judgmark2" );
- aezfSetFontRowStyle("grd_subresultdetail1" , "11" , "H" , "judgmark2" );
-
- // 체크박스 사용(한줄띄우기위해사용함) 해제
- for ( var i = 1; i <= srchLength1; i++ ) {
- //alert("reptrslt["+i+"]==>["+model.getValue("/root/main/subordlist1/subresultdetail1["+ i +"]/reptrslt")+"]");
- if ( model.getValue("/root/main/subordlist1/subresultdetail1["+ i +"]/judgmark") == "" ||
- model.getValue("/root/main/subordlist1/subresultdetail1["+ i +"]/judgmark") == "T" ||
- model.getValue("/root/main/subordlist1/subresultdetail1["+ i +"]/judgmark") == "P"
- ) {
- //grd_subresultdetail1.isReadOnly(i, 0, i, 1) = true; // 체크박스 사용 해제
- }else {
-
- //grd_subresultdetail1.isReadOnly(i, 0, i, 1) = false; // 체크박스 사용
- }
- }
- //진단검사 HLA 검사적용 여부, 20090128, 장준원
- fGetHLAList();
- }
- function fGetHLAList() {
- if ( btn_case1.selected) {
- var cnt = 0;
-
- if ( grd_maindaily.rows >= grd_maindaily.fixedRows ) {
- var loop = grd_maindaily.rows - grd_maindaily.fixedRows;
- for( var i = 1 ; i <= loop ; i++ ) {
- if ( model.getValue("/root/main/ordlist1/maindailylist[" + i + "]/hla") == "Y" ) cnt++;
- }
- }
-
- if ( cnt > 0 ) {
- model.makeValue("/root/hidden/refparam/pid" , model.getValue("/root/send/data/singdata/srchpid"));
- //2011-05-27 진상찬: 팝업 없음. 주석
- //open("SPLLP90200" , "","","","","/root/hidden/refparam" , "/root/hidden/refparam");
- return;
- }
- }else {
- return;
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : Daily 결과 상세조회 Function
- */
- function fClickResultList(maingridlistid) {
- if ( maingridlistid.row == 0 ) return;
-
- if ( maingridlistid.row >= maingridlistid.fixedRows ) {
-
- var row = maingridlistid.row;
-
- // 일자별
- if ( btn_case1.selected == true ) {
- //fGetWideListX1(switch1, grd_maindaily);
- fGetWideListX1(grd_maindaily);
- fInitial_subordlist();
- model.refresh();
-
- /*
- * 일자별탭 그리드 세팅한다.
- */
- var loop = grd_maindaily.rows - grd_maindaily.fixedRows;
-
- for( var i = 1 ; i <= loop ; i++ ) {
- model.makeValue("/root/main/ordlist1/maindailylist[" + i + "]/level","3");
- }
- // 다시 체크를 할 경우에는 체크박스만 "N"으로 세팅함.
- // if ( model.getValue("/root/main/ordlist1/maindailylist[" + row + "]/check") == "Y" ) {
- // model.setValue("/root/main/ordlist1/maindailylist[" + row + "]/check","N");
- // return;
- // }
- //model.setValue("/root/main/ordlist1/maindailylist[" + row + "]/check","Y");
-
- model.makeValue("/root/main/ordlist1/maindailylist[" + row + "]/srchpid", model.getValue("/root/send/data/singdata/srchpid"));
- model.makeValue("/root/main/ordlist1/maindailylist[" + row + "]/dutplceinstcd", model.getValue("/root/send/globalinstance/instance2"));
-
- var nodeList = instance1.selectNodes("/root/main/ordlist1/maindailylist["+row+"]");
- //var rCSV = getNodeListCSV(nodeList);
- model.copyNode("/root/send/maindata", "/root/main/ordlist1/maindailylist["+row+"]");
-
- // model.copyNode("/root/send/maindata" , "/root/main/ordlist1/maindailylist["+row+"]");
- //alert('rCSV하기전->'+rCSV);
- //model.setValue("/root/send/maindata", rCSV);
- //alert(rCSV);
-
- //2011.05.01진상찬 페이지 처리추가(10건씩)
- var offset = parseInt(model.getValue("root/page2/curpage"));
- //1page면 offset은 0, 1page가 아니면 offset은 page수 * 10 (한페이지당 10건씩 보여줌)
- if(offset == 1)
- {
- offset = offset - 1;
- }
- else
- {
- offset = (offset - 1) * 10;
- }
-
- model.removenode("/root/send/maindata/offset");
- model.removenode("/root/send/maindata/pagesize");
- model.makeValue("/root/send/maindata/offset", String(offset)); //몇번째 데이터 부터 조회할지 지정
- model.makeValue("/root/send/maindata/pagesize", model.getValue("root/page2/pagesize")); //한페이지에 보여줄 건수(10건고정)
-
- //submit("TRAER00850", false);
- submit("TRMOB00016", false);
-
- var maxpage = parseInt(model.getValue("/root/main/subordlist1/subresultdetail1cnt/maxcnt"));
-
- if(maxpage < 10)
- {
- model.setValue("/root/page2/maxpage", "1");
- }
- else
- {
- maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1;
- model.setValue("/root/page2/maxpage", String(maxpage));
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////
-
- model.refresh();
- /*
- * 일자별 결과내역 그리드 세팅한다.
- */
- fSetSubDetailGrid();
- }
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자 환경설정 부서 세팅
- */
- function fSetUserDeptInit(){
-
- //var AnswData = fGetIntefeAnsw("003");
- // 2011-05-27 진상찬: 진료과로 고정
- var AnswData = "진료과";
- if(AnswData != "" ) {
-
- if( AnswData == "전체" ){
- model.setValue("/root/send/data/singdata/deptcd" , "");
- }
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자 환경설정 tab 세팅
- */
- function fSetUserTermInit(){
- //var AnswData = fGetIntefeAnsw("001");
- //2011-05-27 진상찬: 2주로 고정
- var AnswData = "2주";
- if(AnswData != "" ) {
- if(AnswData == "3개월"){
- model.setValue("/root/send/data/term", "90");
- }
- if(AnswData == "6개월"){
- model.setValue("/root/send/data/term", "180");
- }
- if(AnswData =="9개월"){
- model.setValue("/root/send/data/term", "270");
- }
- if(AnswData == "1년"){
- model.setValue("/root/send/data/term", "365");
- }
- if(AnswData == "2년"){
- model.setValue("/root/send/data/term", "730");
- }
- if(AnswData == "1주"){
- model.setValue("/root/send/data/term", "7");
- }
- if(AnswData == "2주"){
- model.setValue("/root/send/data/term", "14");
- }
-
- ipt_date2.value = getCurrentDate();
- var date2 = ipt_date2.value;
- var term = model.getValue("/root/send/data/term");
- ipt_date1.value = date2.toDate().getAddDate(-term,"D").getDateFormat("YYYYMMDD") ;
-
- }else {
- // 조회기간, Combo Box 초기화
- ipt_date1.value = getCurrentDate();
- var vRsrvdd = ipt_date1.value ;
- vRsrvdd = vRsrvdd.toDate("YYYYMMDD");
- vRsrvdd = vRsrvdd.getAddDate(-90);
- ipt_date1.value = vRsrvdd.getDateFormat();
- ipt_date2.value = getCurrentDate();
- model.setValue("/root/send/data/term", 90);
- }
- }
- /* @group : 결과조회
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 결과 조회 Grid 펼치기 Function */
- function fGetWideListX1(grd1) {
- var extnGrdWidht2 = 459;
- grd1.attribute("width") = extnGrdWidht2;
- }
|