123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662 |
- /*
- 카덱스관리(SMMNB03000_카덱스관리_KNU.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var ePID = "";
- var eINDD = "";
- var eCRETNO = "";
- //20110208_SMY추가
- var eORDTYPE = "";
- var eINSTCD = "";
- //20110211_SMY추가
- var eERDEPTCD = "";
- var eERFLAG = "";
- var ePRCPDD = "";
- var prcpstat="1";
- var xPathPatDetlInfo = "/root/main/kardexinfo/patdetlinfo";//환자상세정보
- var xPathPatList = "/root/main/kardexinfo/ompatlist";
- var xPathHiddenPatList = "/root/hidden/kardexinfo/ompatlist";
- var xPathTodayScheduleList = "/root/main/kardexinfo/todayschedulelist";//오늘스케쥴
- var xPathTomorrowScheduleList = "/root/main/kardexinfo/tomorrowschedulelist";//내일스케쥴
- var xPathAssessInfo = "/root/main/kardexinfo/assessinfo";//최근Assess
- var xPathTodayList1 = "/root/main/kardexinfo/todaylist1";//욕창
- var xPathTodayList2 = "/root/main/kardexinfo/todaylist2";//통증
- var xPathTodayList3 = "/root/main/kardexinfo/todaylist3";//유지기구
- var xPathHiddenTodayList3 = "/root/hidden/kardexinfo/todaylist3";//유지기구
- var xPathCardexSetList = "/root/main/kardexinfo/cardexsetlist";//카덱스set정보
- var xPathHidCardexSetList = "/root/hidden/kardexinfo/cardexsetlist";//카덱스set정보
- var xPathMemoList = "/root/main/kardexinfo/memolist";
- var xPathHidMemoList = "/root/hidden/kardexinfo/memolist";
- var xPathConsultInfo = "/root/main/kardexinfo/consultinfo"
- var xPathNarcInfo = "/root/main/kardexinfo/narclist"
- var xPathHiddenNarcInfo = "/root/hidden/kardexinfo/narclist"
- var xPathHiddenCatheterList = "/root/hidden/kardexinfo/catheterlist";//조회시 hidden검사관리정보
- var xPathCatheterList = "/root/main/kardexinfo/catheterlist";//Catheter정보
- var xPathMedrMemoInfo = "/root/main/kardexinfo/medrmemoinfo";
- var xPathHidMedrMemoInfo = "/root/hidden/kardexinfo/medrmemoinfo";
- var xPathMedrList = "/root/main/kardexinfo/medrlist";
- var xPathMedrPrcpddList = "/root/main/kardexinfo/medrprcpdd";
- var xPathMedrPrcpList = "/root/main/kardexinfo/medrprcplist";
- var xPathHiddenTestList = "/root/hidden/kardexinfo/testlist";//조회시 hidden검사관리정보
- var xPathTestList = "/root/main/kardexinfo/testlist";//실제 보이는 검사관리정보
- var openx = 'N';
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기값 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- //fClearExceptPatList();
- //------------(20101019) 경북대
- //응급의료센터 부서코드 추출
-
- model.makeValue("/root/send/cdgrupid", "'002', 'U31'");
- model.makeValue("/root/send/srchdd" , getCurrentDate()); // 조회기준일자
- if(submit("TRMNW00001", false)){
- eERDEPTCD = model.getvalue("/root/code/codeinfo/codelist[cdgrupid='002']/cdid");
- }
- btn_today.selected = true;
- model.makeValue(xPathPatDetlInfo + "/roomcd", "병실");
- model.makeValue(xPathPatDetlInfo + "/pid" , "등록번호");
- model.makeValue(xPathPatDetlInfo + "/patnm" , "환자명");
- model.makeValue(xPathPatDetlInfo + "/sexage", "S/A");
- //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
- model.setValue("/root/main/cond/settingrnid", "");
- model.setValue("/root/main/cond/userid" , getUserId());
- model.setValue("/root/main/cond/usernm" , getUserName());
- model.setValue("/root/main/cond/orddd" , getCurrentDate());
-
- // 정렬순서 초기화 칠곡:병상순, 본원:환자명순
- if(openx == 'N'){
- if(getUserInfo("dutplceinstcd") == "032") {
- model.makeValue("/root/main/cond/sortflag", "2");
- rdo_sortflag.refresh();
- } else {
- model.makeValue("/root/main/cond/sortflag", "1");
- rdo_sortflag.refresh();
- }
- }
-
- openx = 'Y';
-
- // 환자정보 조회
- model.removenodeSet("/root/main/paminfo");
- model.makeNode("/root/main/paminfo");
- var sPamInfo = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/paminfo",sPamInfo,"pamlist");
- ePID = model.getValue("/root/main/paminfo/pamlist/pid");
- eINDD = model.getValue("/root/main/paminfo/pamlist/indd");
- eCRETNO = model.getValue("/root/main/paminfo/pamlist/cretno");
- var sWardCd = model.getValue("/root/main/paminfo/pamlist/wardcd");
- if( !isNull(sWardCd)){
- model.setValue("/root/main/cond/wardcd", sWardCd);
- }else{
- model.setValue("/root/main/cond/wardcd", getUserInfo("dutplcecd"));
- }
-
- // 투약관리 화면 그리드명 변경_160512_AYS_칠곡인증평가관련_혼동주의 고위험약 문구제거
- if(getUserInfo("dutplceinstcd") == '032') {
- grd_medi2.caption = "구분^처방코드^처방명^1일\n용량^1회\n용량^단\n위^1일\n수량^1회\n수량^단\n위^1일\n횟수^기간^용법";
- }
- //공통함수로 수정_20110211_ SMY
- fGetWardChngInfo();
- //응급실 구역정보 셋팅추가_20110216_SMY
- var sSectionCd = model.getValue("/root/main/paminfo/pamlist/sectioncd");
- if( !isNull(sSectionCd)){
- model.setValue("/root/main/cond/zonecd", sSectionCd);
- }
- //환자리스트 조회
- if ( isNull(ePID) ){
- fGetMedSpccdList("pat");
- } else {
- fGetMedSpccdList("all");
- }
- }
- /**
- * @group :
- * @ver : 2011.02.11
- * @by : 성미연
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 병동, 내환자, 구역정보(응급실인 경우) 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetWardChngInfo(){
-
- if ( model.getValue("/root/main/cond/wardcd") == eERDEPTCD) {
- eERFLAG = "Y";
- }else{
- eERFLAG = "";
- }
-
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/main/cond/wardcd"));
- submit("TRMNW00101");
- model.setValue("/root/main/cond/settingrnid", "");
- for(i=1; i <= getNodesetCount("/root/init/settingrn"); i++ ) {
- if (model.getValue("/root/main/cond/userid") == model.getValue("/root/init/settingrn["+ i +"]/settingrnid")) {
- model.setValue("/root/main/cond/settingrnid", model.getValue("/root/main/cond/userid"));
- }
- }
-
- //응급실인 경우 구역정보 추가조회
- if(eERFLAG == "Y"){
- fGetZoneList();
- cap_zone.visible = "true";
- cmb_zone.visible = "true";
- //cap_settingrnid.attribute("text") = "구 역:";
- //btn_settingrnid.visible = "false";
-
- cap_settingrnid.attribute("left") = 398;
- cap_settingrnid.attribute("top") = 10;
- cmb_settingrnid.attribute("left") = 473;
- cmb_settingrnid.attribute("top") = 8;
- button20.attribute("left") = 538;
- button20.attribute("top") = 7;
-
- caption20.attribute("left") = 630;
- caption20.attribute("top") = 10;
- ipt_orddd.attribute("left") = 716;
- ipt_orddd.attribute("top") = 8;
- caption34.attribute("left") = 818;
- caption34.attribute("top") = 10;
- rdo_sortflag.attribute("left") = 900;
- rdo_sortflag.attribute("top") = 10;
- model.setValue("/root/main/cond/zonecd", "-");
- }else{
- cap_zone.visible = "false";
- cmb_zone.visible = "false";
- //cap_settingrnid.attribute("text") = "내환자:"
- //btn_settingrnid.visible = "true";
- model.setValue("/root/main/cond/zonecd", "");
-
- cap_settingrnid.attribute("left") = 245;
- cap_settingrnid.attribute("top") = 10;
- cmb_settingrnid.attribute("left") = 320;
- cmb_settingrnid.attribute("top") = 8;
- button20.attribute("left") = 387;
- button20.attribute("top") = 7;
-
- caption20.attribute("left") = 485;
- caption20.attribute("top") = 10;
- ipt_orddd.attribute("left") = 568;
- ipt_orddd.attribute("top") = 8;
-
- caption34.attribute("left") = 675;
- caption34.attribute("top") = 10;
- rdo_sortflag.attribute("left") = 760;
- rdo_sortflag.attribute("top") = 10;
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트 클릭시 환자 상세정보 셋팅
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingPatDetlInfo(rowNo) {
- //상단 환자 정보 셋팅
- model.makeValue(xPathPatDetlInfo + "/roomcd", model.getValue(xPathPatList + "[" + rowNo + "]/roomcd"));
- model.makeValue(xPathPatDetlInfo + "/pid", model.getValue(xPathPatList + "[" + rowNo + "]/pid"));
- model.makeValue(xPathPatDetlInfo + "/patnm", model.getValue(xPathPatList + "[" + rowNo + "]/patnm"));
- model.makeValue(xPathPatDetlInfo + "/sexage", model.getValue(xPathPatList + "[" + rowNo + "]/sexage"));
- model.makeValue(xPathPatDetlInfo + "/vipyn", model.getValue(xPathPatList + "[" + rowNo + "]/vipyn"));
- model.makeValue(xPathPatDetlInfo + "/rqstyn", model.getValue(xPathPatList + "[" + rowNo + "]/rqstyn"));
- model.makeValue(xPathPatDetlInfo + "/spcffactyn", model.getValue(xPathPatList + "[" + rowNo + "]/spcffactyn"));
- model.makeValue(xPathPatDetlInfo + "/clincstdyyn", model.getValue(xPathPatList + "[" + rowNo + "]/clincstdyyn"));
- model.makeValue(xPathPatDetlInfo + "/cpyn", model.getValue(xPathPatList + "[" + rowNo + "]/cpyn"));
- model.makeValue(xPathPatDetlInfo + "/indschstat", model.getValue(xPathPatList + "[" + rowNo + "]/indschstat"));
- model.makeValue(xPathPatDetlInfo + "/serdiag", model.getValue(xPathPatList + "[" + rowNo + "]/serdiag"));
- model.makeValue(xPathPatDetlInfo + "/rarediag", model.getValue(xPathPatList + "[" + rowNo + "]/rarediag"));
- model.makeValue(xPathPatDetlInfo + "/chngroomstat", model.getValue(xPathPatList + "[" + rowNo + "]/chngroomstat"));
- if(model.getValue(xPathPatDetlInfo + "/vipyn") !="" ){cap_vipyn.attribute('background-color') = '#ffff99';}
- else{ cap_vipyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/rqstyn") !="" ){opt_rqstyn.attribute('background-color') = '#ffff99';}
- else{ opt_rqstyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/spcffactyn") !="" ){opt_spcffactyn.attribute('background-color') = '#ffff99';}
- else{ opt_spcffactyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/clincstdyyn") !="" ){cap_clincstdyyn.attribute('background-color') = '#ffff99';}
- else{ cap_clincstdyyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/cpyn") !="" ){opt_cpyn.attribute('background-color') = '#ffff99';}
- else{ opt_cpyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/blodprepyn") !="" ){opt_blodprepyn.attribute('background-color') = '#ffff99';}
- else{ opt_blodprepyn.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/chngroomstat")!="" ){opt_chngroomstat.attribute('background-color') = '#ffff99';}
- else{ opt_chngroomstat.attribute('background-color') = '#ffffff';}
- if(model.getValue(xPathPatDetlInfo + "/indschstat") !="" ){opt_indschstat.attribute('background-color') = '#ffff99';}
- else{ opt_indschstat.attribute('background-color') = '#ffffff';}
- var blodprep = model.getValue(xPathPatList + "[" + rowNo + "]/blodprepyn");
- if (blodprep == "Y") {
- opt_blodprepyn.attribute("background-image") = "../../../emr/commonweb/images/blood.gif";
- } else {
- opt_blodprepyn.attribute("background-image") = "";
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트 클릭시
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickPatList() {
- var deptcd = cmb_wardcd.value;
- var userdept = getUserInfo("dutplcecd");
- var spiritdept = model.getValue("/root/code/codeinfo/codelist[cdgrupid ='U31']/cdid");
-
- if(deptcd == spiritdept) {
- if(userdept != spiritdept) {
- messageBox("환자 개인정보 보호를 위해 해당병동 사용자외엔 조회를 제한합니다", "E");
- return;
- }
- }
- ePID = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid");
-
- if(ePID == "3292911") { // 메르스 확정환자
- if (!fContainsHardCD("5703", getUserInfo("userid"))) {
- messageBox("환자번호 : " + ePID + "\n개인정보보호 관리대상 환자로 접근권한을 제한 합니다.\n\n진료지원실장 양동헌", "E999");
- return ;
- }
- }
-
- if (grd_patlist.row > 0 ) {
- //응급실 상단추가----------(20101018) 경북대
- if ( model.getValue("/root/main/cond/wardcd") != eERDEPTCD ) {
- //입원
- ePID = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid");
- eINDD = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd");
- eCRETNO = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno");
- ePATNM = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/patnm");
- eSIGNINFOCNT = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/signinfocnt"); // 간호정보조사지 인증저장건수
-
- if(eSIGNINFOCNT == 0){
- messageBox("인증저장 되지 않은 간호정보조사지가 있습니다.\n확인하시기 바랍니다.","I");
- }
- //fSettingPatDetlInfo( grd_patlist.row );
- // 상단 세팅을 위한 파라미터
- condparam = "I"+ "▦" + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid")
- + "▦" + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd")
- + "▦" + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno")
- + "▦" + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
- setParameter("condparam", condparam);
- //상단 세팅 화면 사이즈 작게 띄움
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else {
- //응급
- eORDTYPE = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/ordtype" );
- ePID = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid" );
- eINDD = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd" );
- eCRETNO = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno" );
- eINSTCD = model.getValue(xPathPatList + "[" + grd_patlist.row + "]/instcd" );
- var param = "E" + "▦"
- + ePID + "▦"
- + eINDD + "▦"
- + eCRETNO + "▦"
- + eINSTCD + "▦" ;
- setParameter("condparam", param);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- }
- fGetMedSpccdList("clickpat");
- }
- //메인에 보여지는 화면 오브젝트를 가져온다.
- var mainObj = getMainViewer();
- if(mainObj != null) {
- scrid = mainObj.javascript.getScreenID();
- if(scrid == "SMMNW00100") {
- mainObj.javascript.fInqurySelectedPrgm();
- } else if(scrid == "SMMNE00100"){
- mainObj.javascript.fSeletedSrcTool();
- }
- }
- }
- function fActivitySave(pDelFlag){
- model.removeNodeset("/root/send/savedata");
- var savecnt = 1;
- var stat;
- var itemnm;
- for( var idx = 1; idx <= grd_cadexset.rows - grd_cadexset.fixedRows; idx++ ){
- stat = model.getValue(xPathCardexSetList + "["+idx+"]/status"); //각각 행에 대한 수정정보를 가져온다.
- itemnm = grd_cadexset.labelMatrix( idx , grd_cadexset.colRef("itemnm"));
-
- if( pDelFlag != "delete" && (stat == "i" || stat == "u") ){ //저장이나 수정일 경우
- if ( isNull(model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts")) ){
- messageBox("저장할 내용을 ", "C001");//입력하십시요
- return;
- }
-
-
- if(itemnm == "Activity"){
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , model.getValue(xPathCardexSetList + "["+idx+"]/status"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "C");
- model.makeValue("/root/send/savedata["+ savecnt +"]/prcpcd" , "-");
- model.makeValue("/root/send/savedata["+ savecnt +"]/bizspec" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/itemcd" , "test");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memocnts" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "07");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- } else if(itemnm == "입원동기") {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , model.getValue(xPathCardexSetList + "["+idx+"]/status"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "입원동기");
- model.makeValue("/root/send/savedata["+ savecnt +"]/prcpcd" , "-");
- model.makeValue("/root/send/savedata["+ savecnt +"]/bizspec" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/itemcd" , "test");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memocnts" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "10");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- } else if(itemnm == "과거병력") {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , model.getValue(xPathCardexSetList + "["+idx+"]/status"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "과거병력");
- model.makeValue("/root/send/savedata["+ savecnt +"]/prcpcd" , "-");
- model.makeValue("/root/send/savedata["+ savecnt +"]/bizspec" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/itemcd" , "test");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memocnts" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "11");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- }else {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , model.getValue(xPathCardexSetList + "["+idx+"]/status"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "특이");
- model.makeValue("/root/send/savedata["+ savecnt +"]/prcpcd" , "-");
- model.makeValue("/root/send/savedata["+ savecnt +"]/bizspec" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/itemcd" , "test");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memocnts" , model.getValue(xPathCardexSetList + "["+idx+"]/itemcnts"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "07");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- }
- }else if ( pDelFlag == "delete"
- && model.getValue(xPathCardexSetList + "["+idx+"]/status") == "d"){
- if(itemnm == "Activity"){
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , "d");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "C");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "07");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- } else if(itemnm == "입원동기") {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , "d");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "입원동기");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "10");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- } else if(itemnm == "과거병력") {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , "d");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "과거병력");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "11");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- } else {
- model.makeValue("/root/send/savedata["+ savecnt +"]/status" , "d");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntflag" , "특이");
- model.makeValue("/root/send/savedata["+ savecnt +"]/apntseqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/pid" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/indd" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/cretno" , model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/orddd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/memoitemflag", "07");
- model.makeValue("/root/send/savedata["+ savecnt +"]/seqno" , model.getValue(xPathCardexSetList + "["+idx+"]/flag"));
- model.makeValue("/root/send/savedata["+ savecnt +"]/recdd_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(0,8));//특이사항은 일시가 조회되어넘어옴.
- model.makeValue("/root/send/savedata["+ savecnt +"]/rectm_b" , model.getValue(xPathCardexSetList + "["+idx+"]/recdd").substring(8));
- }
- }
- savecnt++;
- }
- if ( getNodesetCount("/root/send/savedata") <= 0 ){
- return;
- }
- model.removeNodeSet(xPathCardexSetList);
- if(submit("TXMNB00204","false")){
- //카덱스 정보 Setting
- if(getNodesetCount(xPathHidCardexSetList) > 0 ){
- model.makeNode(xPathCardexSetList);
- copyNodesetType(xPathCardexSetList, xPathHidCardexSetList, "replace", model, model); //tfHelper.js뒤에 경로 노드셋을 앞에 경로 노드셋에 복사.
- }
-
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자번호가 없거나 내환자, 업무일자 value change시 환자리스트에
- * 전역변수에 환자정보와 일치하는 값이 존재할경우 all 이고 아니면 pat으로 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetKardexInfo() {
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투약, 검사관리 조회
- * @param :srchflag : cardex(카덱스 저장버튼 클릭 및 팝업화면에서 값 수정시 )
- , med(투약관리 저장클릭시)
- , test(검사관리의 조회버튼 클릭시)
- , all (환자리스트를 포함한 모든정보 조회할경우 )
- , pat (환자리스트만 조회)
- , clickpat (환자리스트를 클릭했을때 조회)
- , today (기구관리기록 화면닫을경우)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetMedSpccdList(srchflag){
-
- var deptcd = cmb_wardcd.value;
- var userdept = getUserInfo("dutplcecd");
- var spiritdept = model.getValue("/root/code/codeinfo/codelist[cdgrupid ='U31']/cdid");
-
- if(deptcd == spiritdept) {
- if(userdept != spiritdept) {
- messageBox("환자 개인정보 보호를 위해 해당병동 사용자외엔 조회를 제한합니다", "E");
- return;
- }
- }
-
- var medrcnt = 0;
- var prcpdd = "";
- var preprcpdd = "";
- var nodecnt = 1;
- var orddd = model.getValue("/root/main/cond/orddd");
- var srcNodePath="";
- var destNodePath="";
- var destobj;
- //메모리스트 조회 조건 추가 20081216 김홍점
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/wardcd" , model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/reqdata/orddd" , orddd);
- model.makeValue("/root/send/reqdata/orddd_1", getDateAddc(orddd, 1));
- //검사관리용 조건
- model.makeValue("/root/send/reqdata/twodaypreorddd" , getDateAddc(orddd, -1));
- model.makeValue("/root/send/reqdata/twoweekpreorddd", getDateAddc(orddd, -14));
- model.makeValue("/root/send/reqdata/testprcpflag", model.getValue("/root/main/cond/testprcpflag"));
- model.makeValue("/root/send/reqdata/execflag" , model.getValue("/root/main/cond/execflag"));
- //model.makeValue("/root/send/reqdata/srchflag", srchflag);
- model.makeValue("/root/send/reqdata/pid" , ePID );
- model.makeValue("/root/send/reqdata/indd" , eINDD );
- model.makeValue("/root/send/reqdata/cretno" , eCRETNO );
- model.makeValue("/root/send/reqdata/settingrnid", model.getValue("/root/main/cond/settingrnid"));
- //응급실정보 추가_20110211_SMY
- model.makeValue("/root/send/reqdata/erflag", eERFLAG);
- model.makeValue("/root/send/reqdata/zonecd", model.getValue("/root/main/cond/zonecd"));
-
- setParameter("SPMNR11100_pid", grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("pid")));
- setParameter("SPMNR11100_indd", grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("indd")));
- setParameter("SPMNR11100_cretno", grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("cretno")));
- setParameter("SPMNR11100_wardcd", model.getValue(cmb_wardcd.attribute("ref")));
- setParameter("SPMNR11100_orddd", model.getValue(ipt_orddd.attribute("ref")));
-
-
- //환자리스트 쿼리 변경된걸로 조회
- model.makeValue("/root/send/reqdata/newflag", "Y");
-
- //환자리스트 정렬 순서
- model.makeValue("/root/send/reqdata/sortflag", model.getValue("/root/main/cond/sortflag"));
- if ( srchflag =="all" || srchflag =="clickpat" || srchflag == "pat" ){
- model.makeValue("/root/send/reqdata/srchflag", srchflag);
- if(submit("TRMNB00203")){
- if(model.getValue("/root/main/kardexinfo/consultinfo/sysdatereqcnt") > 0){
- output1.attribute("color") = "#ff0000";
- }else{
- output1.attribute("color") = "#000000";
- }
-
- if(model.getValue("/root/main/kardexinfo/consultinfo/sysdaterepcnt") > 0){
- output2.attribute("color") = "#0000ff";
- }else{
- output2.attribute("color") = "#000000";
- }
-
- output1.refresh();
- output2.refresh();
-
- fSettingCardexDetlInfo();
- fCheckNacrCnt();
- }
- }else {
- model.makeValue("/root/send/reqdata/srchflag", srchflag);
- destNodePath="";
- srcNodePath="";
- if( srchflag == "test" ){
- model.removeNodeSet(xPathTestList);
- srcNodePath = xPathHiddenTestList;
- destNodePath = xPathTestList;
- destobj = grd_test;
- }else if ( srchflag == "cath" ){
- model.removeNodeSet(xPathCatheterList);
- srcNodePath = xPathHiddenCatheterList;
- destNodePath = xPathCatheterList;
- destobj = grd_catheter;
- }else if ( srchflag == "today" ){
- model.removeNodeSet(xPathTodayList3);
- srcNodePath = xPathHiddenTodayList3;
- destNodePath = xPathTodayList3;
- destobj = grd_today3;
- }else if ( srchflag == "narc" ){
- model.removeNodeSet(xPathNarcInfo);
- srcNodePath = xPathHiddenNarcInfo;
- destNodePath = xPathNarcInfo;
- destobj = grd_today3;
- }
- if(submit("TRMNB00201", false)){
- if ( getNodesetCount(srcNodePath) > 0 ){
- model.makeNode(destNodePath);
- copyNodesetType(destNodePath, srcNodePath, "replace", model, model);
- }
- destobj.rebuild();
- fCheckNacrCnt();
- }
- }
- fSettingGridColor();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트에 환자정보 존재하는지 체크
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCheckExistPid() {
- if( !isNull(ePID) ){
- for(var i = 1; i <= getNodesetCount(xPathPatList); i++){
- if(model.getValue(xPathPatList+"[" + i + "]/pid") == ePID){
- model.setFocus("grd_patlist");
- grd_patlist.row = i;
- break;
- }
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자의 카덱스 정보 조회후 세팅
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingCardexDetlInfo() {
- fCheckExistPid();
- if ( grd_patlist.row > 0 ){
- grd_patlist.dispatch("onentercell");
- fSettingPatDetlInfo(grd_patlist.row);
- grd_patlist.refresh();
- }
- cap_today.text = getNodesetCount(xPathTodayScheduleList);
- cap_tomorrow.text = getNodesetCount(xPathTomorrowScheduleList);
- // 제증명신청건수/사본발급건수 가 있을경우 환자정보 리스트에 파란색으로 표시
- for (var i=1;i<=getNodesetCount(xPathPatList);i++) {
- var pGrdCertValue = model.getValue("/root/main/kardexinfo/ompatlist[" + i + "]/certcount"); // 제증명신청건수
- var pGrdCpapValue = model.getValue("/root/main/kardexinfo/ompatlist[" + i + "]/cpapcount"); // 사본발급건수
-
- if(pGrdCertValue > 0 || pGrdCpapValue > 0){
- grd_patlist.cellStyle("color",i, grd_patlist.colRef("patnm")) = "#0000ff";
- }else{
- grd_patlist.cellStyle("color",i, grd_patlist.colRef("patnm")) = "#000000";
- }
- }
- grd_patlist.refresh();
-
- var meprcpdd = getNodesetCount(xPathMedrPrcpddList);
- if (meprcpdd > 0) {
- grd_medi1.row = grd_medi1.findRow(model.getValue("/root/main/cond/orddd"), 1, 0);
- grd_medi1.topRow = grd_medi1.row-1;
- fDBClickMedr();
- }
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트를 제외한 환자 상세정보 값 clear
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCheckNacrCnt() {
- //마약 미정리건 블러킹 20090504 김홍점
- if ( model.getValue(xPathNarcInfo + "/cnt") > "0" ){
- messageBox("정리되지 않은 마약이 존재합니다.","I007");
- model.setAttribute("Narc_Menu_Param", "");
- var sParam = "I,op";
- model.setAttribute("Narc_Menu_Param", sParam);
- model.setAttribute("SMADT30400_Fromdd", model.getValue(xPathNarcInfo+"/prcpdd"));
- modal("SMADT30400","1","15","128");
- model.setAttribute("SMADT30400_Fromdd", "");
- fGetMedSpccdList("narc");
- }
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트를 제외한 환자 상세정보 값 clear
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClearExceptPatList() {
- model.resetInstanceNode(xPathConsultInfo);
- model.resetInstanceNode(xPathAssessInfo);
- model.resetInstanceNode(xPathMedrMemoInfo);
- model.resetInstanceNode(xPathPatDetlInfo);
- opt_blodprepyn.attribute("background-image") = "";
- model.setValue(xPathPatDetlInfo + "/roomcd", "병실");
- model.setValue(xPathPatDetlInfo + "/pid", "등록번호");
- model.setValue(xPathPatDetlInfo + "/patnm", "환자명");
- model.setValue(xPathPatDetlInfo + "/sexage", "S/A");
- model.removeNodeSet(xPathMemoList);
- model.removeNodeSet(xPathTodayScheduleList);
- model.removeNodeSet(xPathTomorrowScheduleList);
- model.removeNodeSet(xPathTodayList1);
- model.removeNodeSet(xPathTodayList2);
- model.removeNodeSet(xPathTodayList3);
- model.removeNodeSet(xPathCardexSetList);
- model.removeNodeSet(xPathHiddenCatheterList);
- model.removeNodeSet(xPathCatheterList);
- model.removeNodeSet(xPathMedrList);
- model.removeNodeSet(xPathMedrPrcpddList);
- model.removeNodeSet(xPathMedrPrcpList);
- model.removeNodeSet(xPathHiddenTestList);
- model.removeNodeSet(xPathTestList);
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투약관리 처방적용일 더블클릭시
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDBClickMedr(){
- var row = grd_medi1.row;
- var medrcnt = getNodesetCount(xPathMedrList);
- var prcpdd = model.getValue(xPathMedrPrcpddList + "[" + row + "]/prcpdd");
- ePRCPDD = prcpdd;
- var hngnm = "";
- var prcpvol = "";
- var prcpvolunitflag = "";
- var prcpqty = "";
- var prcpqtyunitflag = "";
- var prcptims = "";
- var abbrnm = "";
- var drugmthdspccd = "";
- var prcpnm = "";
- var prcpstatnm = "";
- var count = 1;
- var icnt = 1;
-
- if(medrcnt > 0){
- model.removeNodeSet(xPathMedrPrcpList);
- model.makeNode(xPathMedrPrcpList);
- copyNodesetType(xPathMedrPrcpList, xPathMedrList + "[prcpdd = '" + prcpdd + "']", "replace", model, model);
- }
- grd_medi2.rebuild();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * 김홍점 20081216 사용안함 fGetMedSpccdList("all")에서 모두 조회 하는걸로 수정
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 메모리스트 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetMemoList(){
- //메모리스트 조회
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/reqdata/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/reqdata/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/reqdata/memoitemflag", '05');
- model.removeNodeset("/root/main/memoinfo");
- model.makeNode("/root/main/memoinfo");
- submit("TRMNB00202");
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투약관리 메모 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDBClickMemo(){
- //메모리스트 조회
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/main/cond/wardcd"));
- //model.makeValue("/root/send/reqdata/orddd", ePRCPDD);
- model.makeValue("/root/send/reqdata/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/reqdata/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/reqdata/memoitemflag", '06');
- submit("TRMNB00204");
- model.setValue(xPathMedrMemoInfo + "/memocnts", model.getValue("/root/hidden/memoinfo/memolist/memocnts"));
- model.setValue(xPathMedrMemoInfo + "/recdd_b", model.getValue("/root/hidden/memoinfo/memolist/recdd"));
- model.setValue(xPathMedrMemoInfo + "/rectm_b", model.getValue("/root/hidden/memoinfo/memolist/rectm"));
- model.setValue(xPathMedrMemoInfo + "/seqno", model.getValue("/root/hidden/memoinfo/memolist/seqno"));
- if( !isNull(model.getValue("/root/hidden/memoinfo/memolist/recdd"))){
- model.setValue(xPathMedrMemoInfo + "/status", "u")
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * 20081216 김홍점 not use 요구사항에 의해 사용안함.
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : to-do 리스트 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetTodoList() {
- model.removeNodeset("/root/main_todo/todoinfo/todopatlist"); // 교육대상자리스트 Clear
- grd_todolist.refresh();
- model.removenode("/root/send");
- model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/orddd_t", (model.getValue("/root/main/cond/orddd")).toDate().getAddDate(+1, "D").getDateFormat());
- model.makeValue("/root/send/settingrnid", model.getValue("/root/main/cond/settingrnid"));
- model.makeValue("/root/send/memoitemflag", '04');
- model.makeValue("/root/send/status", '01');
- model.makeValue("/root/send/patinfoyn", 'Y');
- grd_todolist.allStyle("data", "background-image") = "";
- model.makeValue("/root/send/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- for(var i = 1 ; i < grd_todolist.rows ; i++){
- for(var j = 17 ; j < 100 ;){
- grd_todolist.cellStyle("background-color", i, j, i,j) = "#FFFFFF";
- j = j+3;
- }
- }
- if (submit("TRMNW00401")) {
- for(var i = 1 ; i < grd_todolist.rows ; i++){
- var blodprep = model.getValue("/root/main_todo/todoinfo/todopatlist[" + i + "]/blodprepyn");
- if (blodprep == "Y") {
- model.setValue("/root/main_todo/todoinfo/todopatlist[" + i + "]/blodprepyn", "");
- grd_todolist.cellstyle("background-image", i , 7) = "../../../emr/commonweb/images/blood.gif";
- } else {
- grd_todolist.cellstyle("background-image", i , 7) = "";
- }
- for(var j = 17 ; j < 100 ;){
- if(grd_todolist.valueMatrix(i,j) == "MEMO"){
- grd_todolist.cellstyle("background-image", i, j+1) = "../../../com/commonweb/images/icon_list.gif";
- }
- j = j+3;
- }
- for(var j = 19 ; j < 100 ;){
- var execyn = (grd_todolist.valueMatrix(i,j)).substring(18,19);
- if( execyn == "Y"){
- grd_todolist.cellStyle("background-color", i, j-1, i,j-1) = "#F08080";
- }else{
- grd_todolist.cellStyle("background-color", i, j-1, i,j-1) = grd_todolist.cellStyle("background-color", i, j+1, i,j+1);
- }
- j = j+3;
- }
- }
- }//submit
- }
- /**
- * @group :
- * @ver : 2008.10.05
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 Activity 삭제
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelCardexSet(){
- for ( var idx = 0 ; idx < grd_cadexset.selectedRows ; idx++){
- if( model.getValue(xPathCardexSetList + "["+grd_cadexset.selectedRow(idx)+"]/flag") != "0" ){
- model.makeValue(xPathCardexSetList + "["+grd_cadexset.selectedRow(idx)+"]/status", "d");
- }
- }
- fActivitySave("delete");
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 메모리스트 저장
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fExeMomoList() {
- if ( grd_patlist.row == -1) {
- messageBox("해당 환자가 선택되지", "E007");
- return;
- } else {
- var memocnts = grd_memo.getUpdateData();
- for( var cnt = 1 ; cnt < memocnts.split("▩").length-1 ; cnt++ ){
- if ( getArrayData(memocnts,cnt,2) == "" ){
- messageBox("저장할 메모를", "C001");//" 입력하십시오."
- return;
- }
- }
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- //그리드 저장조건
- for (var i = 1; i < grd_memo.rows; i++) {
- model.setValue(xPathMemoList+"[" + i + "]/memoitemflag", '05');
- model.setValue(xPathMemoList + "[" + i + "]/recdd", model.getValue("/root/main/cond/orddd"));
- model.setValue(xPathMemoList + "[" + i + "]/rectm", getCurrentTime().substr(0, 4));
- model.setValue(xPathMemoList + "[" + i + "]/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.setValue(xPathMemoList + "[" + i + "]/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.setValue(xPathMemoList + "[" + i + "]/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- }
- model.makeValue("/root/send/savedata/memoinfo", grd_memo.getUpdateData());
- //조회조건
- model.makeValue("/root/send/savedata/condinfo/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/savedata/condinfo/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata/condinfo/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata/condinfo/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata/condinfo/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata/condinfo/memoitemflag", '05');
- model.removeNodeSet(xPathMemoList);
- if(submit("TXMNB00203",false)){
- if ( getNodesetCount(xPathHidMemoList) > 0 ){
- model.makeNode(xPathMemoList);
- copyNodesetType(xPathMemoList, xPathHidMemoList, "replace", model, model);
- }
- messageBox("성공적으로", "I001");
- }
- grd_memo.rebuild();
- }
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투약관리 메모 저장
- * @param :pFlag:"D" 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMedrMomoSave(pFlag){
- var saveHearder = "m▦memocnts▦pid▦memoitemflag▦seqno▦recdd_b▦rectm_b▦indd▦cretno▩";
- var saveData = "";
- var status = "";
- if ( grd_patlist.row == -1) {
- messageBox("해당 환자가 선택되지", "E007");
- return;
- } else {
- if( pFlag =="D"){
- saveData = "d" + "▦"
- + "" + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid") + "▦"
- + "06" + "▦"
- + model.getValue(xPathMedrMemoInfo + "/seqno") + "▦"
- + model.getValue(xPathMedrMemoInfo + "/recdd_b") + "▦"
- + model.getValue(xPathMedrMemoInfo + "/rectm_b") + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd") + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno") + "▩";
- model.makeValue("/root/send/savedata/memoinfo",saveHearder+saveData);
- model.makeValue("/root/send/savedata/condinfo/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/savedata/condinfo/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata/condinfo/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata/condinfo/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata/condinfo/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata/condinfo/memoitemflag", "06");
- model.resetInstanceNode(xPathMedrMemoInfo);
- if(submit("TXMNB00203","false")){
- model.setValue(xPathMedrMemoInfo + "/memocnts", model.getValue(xPathHidMedrMemoInfo + "/memocnts"));
- model.setValue(xPathMedrMemoInfo + "/recdd_b", model.getValue(xPathHidMedrMemoInfo + "/recdd_b"));
- model.setValue(xPathMedrMemoInfo + "/rectm_b", model.getValue(xPathHidMedrMemoInfo + "/rectm_b"));
- model.setValue(xPathMedrMemoInfo + "/seqno", model.getValue(xPathHidMedrMemoInfo + "/seqno"));
- if( !isNull(model.getValue(xPathMedrMemoInfo + "/recdd_b")) ){
- model.setValue(xPathMedrMemoInfo + "/status", "i")
- }else{
- model.setValue(xPathMedrMemoInfo + "/status", "")
- }
- messageBox("성공적으로", "I001");
- }
- }else{
- if ( isNull(model.getValue(xPathMedrMemoInfo + "/memocnts")) ){
- messageBox("저장할 투약관리 메모를", "C001");//" 입력하십시오."
- return;
- }
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- //그리드 저장조건
- // model.makeValue("/root/send/savedata/memoinfo/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- // model.makeValue("/root/send/savedata/memoinfo/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- // model.makeValue("/root/send/savedata/memoinfo/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- // model.makeValue("/root/send/savedata/memoinfo/seqno", model.getValue(xPathMedrMemoInfo+"/seqno"));
- // model.makeValue("/root/send/savedata/memoinfo/memoitemflag", "06");
- // model.makeValue("/root/send/savedata/memoinfo/memocnts", model.getValue(xPathMedrMemoInfo+"/memocnts"));
- // model.makeValue("/root/send/savedata/memoinfo/recdd", getCurrentDate());
- // model.makeValue("/root/send/savedata/memoinfo/rectm", getCurrentTime().substr(0, 4));
- // model.makeValue("/root/send/savedata/memoinfo/recdd_b", model.getValue(xPathMedrMemoInfo+"/recdd_b"));
- // model.makeValue("/root/send/savedata/memoinfo/rectm_b", model.getValue(xPathMedrMemoInfo+"/rectm_b"));
- // model.makeValue("/root/send/savedata/memoinfo/wardcd", model.getValue("/root/main/cond/wardcd"));
- // model.makeValue("/root/send/savedata/memoinfo/orddd", model.getValue("/root/main/cond/orddd"));
- // if(isNull(model.getValue(xPathMedrMemoInfo+"/status"))){
- // model.makeValue("/root/send/savedata/memoinfo/status", "i");
- // }else{
- // model.makeValue("/root/send/savedata/memoinfo/status", "u");
- // }
- //
- if(isNull(model.getValue(xPathMedrMemoInfo+"/status"))){
- status="i";
- }else{
- status="u";
- }
- saveData = status + "▦"
- + model.getValue(xPathMedrMemoInfo+"/memocnts") + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid") + "▦"
- + "06" + "▦"
- + model.getValue(xPathMedrMemoInfo + "/seqno") + "▦"
- + model.getValue(xPathMedrMemoInfo + "/recdd_b") + "▦"
- + model.getValue(xPathMedrMemoInfo + "/rectm_b") + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd") + "▦"
- + model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno") + "▩";
- model.makeValue("/root/send/savedata/memoinfo",saveHearder+saveData);
- model.makeValue("/root/send/savedata/condinfo/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/savedata/condinfo/pid", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/pid"));
- model.makeValue("/root/send/savedata/condinfo/indd", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/indd"));
- model.makeValue("/root/send/savedata/condinfo/cretno", model.getValue(xPathPatList + "[" + grd_patlist.row + "]/cretno"));
- model.makeValue("/root/send/savedata/condinfo/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/savedata/condinfo/memoitemflag", "06");
- model.resetInstanceNode(xPathMedrMemoInfo);
- if(submit("TXMNB00203","false")){
- if ( getNodesetCount(xPathHidMedrMemoInfo) > 0 ){
- copyNodesetType(xPathMedrMemoInfo, xPathHidMedrMemoInfo, "replace", model, model);
- }
- messageBox("성공적으로", "I001");
- }
- }
- tar_remk1.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.10.08
- * @by : 최경용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 내환자 셋팅
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangePidSetting(){
- setParameter("wardcd", model.getValue("/root/main/cond/wardcd"));
- setParameter("userid", model.getValue("/root/main/cond/userid"));
- setParameter("usernm", model.getValue("/root/main/cond/usernm"));
- modal("SMMNB00400","1" ,"868", "128");
- //공통함수로 수정_20110211_ SMY
- fGetWardChngInfo();
- /*
- model.removenode("/root/send");
- model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/main/cond/wardcd"));
- submit("TRMNW00101");
- for(i = 1; i <= getNodesetCount("/root/init/settingrn"); i++ ) {
- if (model.getValue("/root/main/cond/userid") == model.getValue("/root/init/settingrn["+ i +"]/settingrnid")) {
- model.setValue("/root/main/cond/settingrnid", model.getValue("/root/main/cond/userid"));
- }
- }
- */
- fGetMedSpccdList("pat");
- }
- function fShowPopupMenu(gridID, menuPath)
- {
- var gridObj = document.controls.item(gridID);
- if(event.button == 3) {
- if(gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows){
- window.setPopupMenu(true, menuPath, "name", "func", false);
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- //환자정보 오픈
- //서브메뉴를 이용한 오픈은 기본으로 상단정보를 올리도록 적용.
- function fOpenPrcpSpec()
- {
- fClickPatList();
- var pid = model.getValue("/root/main/kardexinfo/ompatlist[" + grd_patlist.row + "]/pid");
- var indd = model.getValue("/root/main/kardexinfo/ompatlist[" + grd_patlist.row + "]/indd");
- var orddd = model.getValue("/root/main/cond/orddd");
- var param = pid + "▩" + "I" + "▩" + indd + "▩" + orddd;
- setParameter("SMMMO02500_pid", pid);
- open("SMMMO02500","1","20","128");
- }
- //환자라벨출력
- function fOpenLabelPrint(){
- //fClickPatList();
- model.setValue("/root/main/printcnt","1");
- group4.attribute("left") = event.ScreenX-window.screenleft-10;
- group4.attribute("top") = event.ScreenY-window.screenTop-50;
- model.setFocus("ipt_patcntctel");
- model.refresh();
- group4.visible = true;
- }
- //간호일지 오픈
- function fOpenNursingRecord()
- {
- fClickPatList();
- open("SMMNR00700","1","20","128");
- }
- function fPopupSearchRecDataInitParam() {
-
- }
- //전실신청 오픈
- function fOpenChngRoom()
- {
- fClickPatList();
- open("SMPMI01700","1","20","128");
- }
- //투약기록 오픈
- function fOpenMediRecord()
- {
- fClickPatList();
- open("SMMNR00600","1","20","128");
- }
- //간호처방 오픈
- function fOpenCarePrcp()
- {
- fClickPatList();
- open("SMMNW10900","1","20","128");
- }
- //바코드관리 오픈
- function fOpenBarcodeMngt()
- {
- fClickPatList();
- open("SMLLC00200","1","20","128");
- }
- //검사결과조회 오픈
- function fOpenTestRslt()
- {
- fClickPatList();
- open("SMAER00800","1","20","128");
- }
- //임상관찰기록 오픈
- function fOpenTPR()
- {
- fClickPatList();
- open("SMMNR00900","1","20","128");
- }
- //퇴원정리 오픈
- function fOpenDschArngnm()
- {
- fClickPatList();
- open("SMMNW01200","1","20","128");
- }
- // 약품인계내역조회추가
- function fOpenDrugList(){
- fClickPatList();
- setParameter("SPMNW12400_PARAM1", model.getValue("/root/main/kardexinfo/ompatlist[" + grd_patlist.row + "]/pid"));
- setParameter("SPMNW12400_PARAM2", model.getValue("/root/main/kardexinfo/ompatlist[" + grd_patlist.row + "]/indd"));
- open("SPMNW12400","1","20","128");
- }
- //2011.1.12, 주희경
- //내환자 메모 출력
- function fGetMypatMemo()
- {
- //var wardcd = model.getValue("/root/main/cond/wardcd");
- if ( cmb_wardcd.label == "" )
- {
- messageBox("병동이 선택되지", "E007");
- return;
- }
- //응급실인 경우 구역정보로 처리되도록 수정_20110214_SMY
- if(eERFLAG == "Y"){
- var zonecd = model.getValue("/root/main/cond/zonecd");
- if ( zonecd == "-" || zonecd == "" )
- {
- messageBox("구역정보가 선택되지", "E007");
- return;
- }
- }else{
- var nursid = model.getValue("/root/main/cond/settingrnid");
- if ( nursid == "-" || nursid == "" )
- {
- messageBox("내환자가 선택되지", "E007");
- return;
- }
- }
- model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/reqdata/nursid", model.getValue("/root/main/cond/settingrnid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/orddd"));
- model.removeNodeset("/root/main/memoinfo");
- model.makeNode("/root/main/mypatmemoinfo");
- //응급실정보 추가_20110214_SMY
- model.makeValue("/root/send/reqdata/erflag", eERFLAG);
- model.makeValue("/root/send/reqdata/zonecd", model.getValue("/root/main/cond/zonecd"));
- if ( submit("TRMNB00205") )
- {
- //debugger;
- model.removeNodeSet("/root/main/rex_memolist");
- var memolist = instance1.selectNodes("/root/main/mypatmemoinfo/memolist");
- var sdeptcd = getUserInfo("dutplcecd");
- //alert("sdeptcd : " + sdeptcd);
- //alert(instance1.selectNodesXml("/root/main/mypatmemoinfo/memolist"));
- var pid = "";
- var groupid = 0;
- var arr = 0;
- var memo = "";
- var memolistcnt = 1;
- var next_pid = "";
- for(i=0; i<memolist.length; i++)
- {
- var new_pid = memolist.item(i).selectSingleNode("pid").value;
- if ( i != memolist.length-1)
- {
- next_pid = memolist.item(i+1).selectSingleNode("pid").value;
- }
- else
- next_pid = "0";
- if ( pid != new_pid )
- {
- groupid++;
- if ( groupid > 3 )
- {
- groupid = 1;
- }
- if ( groupid == 1 )
- {
- arr++;
- model.makeNode("/root/main/rex_memolist/group["+arr+"]");
- }
- model.makeNode("/root/main/rex_memolist/group["+arr+"]/s_group"+groupid);
- pid = new_pid;
- memolistcnt = 1;
- }
- if ( memolistcnt == 1 )
- {
- var tarNode = instance1.selectSingleNode("/root/main/rex_memolist/group["+arr+"]/s_group"+groupid);
- tarNode.appendChild( memolist.item(i).selectSingleNode("roomcd").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("pid").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("patnm").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("sa").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("medispclnm").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("atdoctnm").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("nzoneno").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("specldesc").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("activity").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("inmotive").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("past").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("diagengnm").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("rectermnm").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("diet").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("vs").cloneNode( false ));
- tarNode.appendChild( memolist.item(i).selectSingleNode("vsnm").cloneNode( false ));
- // '15.08.04 - 추가
- tarNode.appendChild( memolist.item(i).selectSingleNode("gesage").cloneNode( false ));
- memo = "";
- }
- var recdt = memolist.item(i).selectSingleNode("recdt").value;
- recdt = recdt.substr(0,4) + "/" + recdt.substr(4,2) + "/" + recdt.substr(6,2) + " " + recdt.substr(8,2) + ":" + recdt.substr(10,2);
- // memo = memo + "[" + memolist.item(i).selectSingleNode("writ").value + "] | " + recdt + "\n"+ memolist.item(i).selectSingleNode("memocnts").value + "\n\n";
- memo = memo + memolist.item(i).selectSingleNode("memocnts").value + "\n";
- memolistcnt++;
- if ( new_pid != next_pid )
- {
- model.makeNode("/root/main/rex_memolist/group["+arr+"]/s_group"+groupid+"/memo");
- model.setValue("/root/main/rex_memolist/group["+arr+"]/s_group"+groupid+"/memo", memo, true);
- }
- }
-
- //alert(instance1.selectNodesXml("/root/main/rex_memolist/group"));
- //model.removeNodeset("/root/main/mypatmemoinfo");
-
- if(sdeptcd == '2100300000' || sdeptcd == '2110200000') {
- exeReportPreview("RPMNB00205", "XMLSTR", "", "", "false", "", "", "", "", "false", "", "", "", "","","","","","","/root/main/rex_memolist/group");
- } else {
- exeReportPreview("RPMNB00200", "XMLSTR", "", "", "false", "", "", "", "", "false", "", "", "", "","","","","","","/root/main/rex_memolist/group");
- }
- }
- }
- /**
- * @group :
- * @ver : 2011.09.08
- * @by : 김병국
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검사관리 일자별 구분선
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingGridColor() {
- var firstdd="";
- var prcpdd ="";
- if(grd_test.rows > grd_test.fixedRows) {
- firstdd = grd_test.valueMatrix(1, grd_test.colRef("prcpdd"));
- }
- for(var i = grd_test.fixedRows; i < grd_test.rows; i++){
- execyn = grd_test.valueMatrix(i, grd_test.colRef("execyn"));
- prcpdd = grd_test.valueMatrix(i, grd_test.colRef("prcpdd"));
- if(firstdd != prcpdd) {
- firstdd = prcpdd;
- //grd_test
- grd_test.rowStyle(i-1, "all", "border-bottom-color") = "#ff0000";
- grd_test.rowStyle(i-1, "all", "border-top-width") = "3";
- } else {
- grd_test.rowStyle(i-1, "all", "border-bottom-color") = "#b0b0b0";
- grd_test.rowStyle(i-1, "all", "border-top-width") = "3";
- }
- if(execyn == "Y") {
- grd_test.rowstyle(i, "data", "background-color") = "#ffffff";
- } else {
- grd_test.rowstyle(i, "data", "background-color") = "#fff000";
- }
- }
-
- grd_test.refresh();
- }
- /**
- * @group :
- * @ver : 2011.09.19
- * @by : 김병국
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : IO조회 저장
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetIoInfo() {
- model.makeValue("/root/send/savedata/pid", grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("pid")) );
- model.makeValue("/root/send/savedata/indd",grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("indd")));
- model.makeValue("/root/send/savedata/cretno",grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("cretno")));
- model.makeValue("/root/send/savedata/ioyn",model.getValue("/root/main/kardexinfo/ioinfo/ioyn"));
- model.makeValue("/root/send/savedata/bstyn",model.getValue("/root/main/kardexinfo/ioinfo/bstyn"));
- model.makeValue("/root/send/savedata/bwyn",model.getValue("/root/main/kardexinfo/ioinfo/bwyn"));
- model.makeValue("/root/send/savedata/acyn",model.getValue("/root/main/kardexinfo/ioinfo/acyn"));
- model.makeValue("/root/send/savedata/iokindcd",model.getValue("/root/main/kardexinfo/ioinfo/iokindcd"));
- model.makeValue("/root/send/savedata/bstkindcd",model.getValue("/root/main/kardexinfo/ioinfo/bstkindcd"));
- submit("TXMNB00212");
- }
- /**
- * @group :
- * @ver : 2012.01.20
- * @by : 김병국
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : PRN관리 조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetPrcpList() {
- if(prcpstat == "1") {
- prcpstat = "2";
- btn_prn.text = "투약관리";
- cap_prcpstat.text = "PRN관리";
- grd_prcplist.visible= true;
- } else {
- prcpstat = "1";
- btn_prn.text = "PRN관리";
- cap_prcpstat.text = "투약관리";
- grd_prcplist.visible= false;
- }
-
- if(grd_patlist.row > 0) {
- model.makeValue("/root/send/reqdata/prnstat" , "1");
- model.makeValue("/root/send/reqdata/prcpdd" , model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/reqdata/cnfmyn" , "Y");
- model.makeValue("/root/send/reqdata/unitflag" , "ward");
- model.makeValue("/root/send/reqdata/opprcpcond" , "1");
-
- model.makeValue("/root/send/reqdata/pid" , grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("pid")));
- model.makeValue("/root/send/reqdata/indd" , grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("indd")));
- model.makeValue("/root/send/reqdata/cretno" , grd_patlist.valueMatrix(grd_patlist.row, grd_patlist.colRef("cretno")));
-
-
-
- model.removeNodeset("/root/main/kardexinfo/prcpinfo/prcplist");
- model.makeNode("/root/man/kardexinfo/prcpinfo");
-
- submit("TRMNW00303");
- }
- }
|