123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419 |
- /*
-
- 통증관리기록(SMMNR00900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sCondPath = "/root/main/cond";
- var xChartHeaderListPath = "/root/main/chartheaderlist";
- var xTMSettingListPath = "/root/temp/clincobsrecinfo/tmsettinglist";
- var xPamInfoPath = "/root/main/paminfo/pamlist"; // 환자정보
- var xPrcpInfoPath1 = "/root/main/searchinfo/prcplist1"; // 처방정보(fromdd)
- var xPrcpInfoPath2 = "/root/main/searchinfo/prcplist2"; // 처방정보(fromdd+1)
- var xPrcpInfoPath3 = "/root/main/searchinfo/prcplist3"; // 처방정보(fromdd+2)
- var xPrcpInfoPath4 = "/root/main/searchinfo/prcplist4"; // 처방정보(fromdd+3)--> srchdd
- var xPainInfoPath1 = "/root/main/searchinfo/painlist1"; //통증정보(fromdd)
- var xPainInfoPath2 = "/root/main/searchinfo/painlist2"; //통증정보(fromdd+1)
- var xPainInfoPath3 = "/root/main/searchinfo/painlist3"; //통증정보(fromdd+2)
- var xPainInfoPath4 = "/root/main/searchinfo/painlist4"; //통증정보(fromdd+3)--> srchdd
- var xTotPainInfoPath = "/root/main/searchinfo/totpainlist"; //통증조회(그래프를 그리기 위한 4일간의 모든 통증기록)
- var xTPRInfoPath = "/root/main/searchinfo/tprlist"; //TPR vs조회
- var xChkObsPartInfoPath = "/root/main/searchinfo/obspartlist"; //통증부위--> 그래프 체크박스에 나타낼 통증부위
- var xPainCountInfoPath = "/root/main/searchinfo/paincount"; //점수가7점이상이 3회이상인경우
- var sHeader = new Array();
- var sFormerHeader = new Array();
- var sPid = ""; // 환자번호
- var sIndd = ""; // 입원일자
- var sCretNo = ""; // 환자 일자별 일련번호
- var sInstcd = ""; // 기관코드
- var sIOFlag = ""; // 입원/외래 구분
- var sWardCD = ""; // 병동코드
- var sRoomCD = ""; // 병실코드
- var sJobKindCD = ""; // 직급코드
- var sIndschacptstat = "";
- var sDschdd = "";
- var sChartItem = new Array();
- var sLineColor = new Array();
- //var sLineColor = new Array(0xcc88dd , 0xff0000 , 0x00ff00 , 0x0000ff , 0x4400cc , 0x6688ff , 0x888822 , 0xff8822 , 0xffff00, 0x88ffff, 0xe5f3c2, 0x6699ff );
- var sCheckColor = new Array("#cc88dd" , "#ffff00" , "#6688ff", "#88ffff" , "#00ff00" , "#ff0000" , "#ff88bb" , "#888822" , "#ff8822" ,"#777777", "#aa3399" , "#ccff44","#ccffbb");
- var sPatNm = "";
- var sSexAge = "";
- var sDutplcecd = "";
- var sOrdDeptcd = "";
- var sMedispclid = "";
- var sUserFlag = "";
- var sUserDeptCd = "";
- var sUserId = "";
- //var sSpParamInfo = "";
- //var sParamInfo = "";
- //var sChartNum = 1;
- //응급의료센터 관련 변수_경북대 (2011.05.03 Ahn)
- var eERDEPTCD = "";
- var eERFLAG = "";
- var eSECTIONCD = "";
- var sSectioncd ="";
- /**
- * @group :
-
- * @ver : 2007.06.27
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(pFlag){
- for( var idx = 0 ; idx < sCheckColor.length ; idx++){
- sLineColor[idx] = RgbToGraph(sCheckColor[idx]);
- }
-
- var sPamInfo = "";
- //var sParamInfo = "";
- //var sSpParamInfo = "";
-
- if(pFlag == "init" || pFlag == "reset"){
- //fMakeChart("init24hours");
- fMakeChart("init4days");
- }
- if(pFlag == "init"){
-
- //사용자 직급구분에 따른 화면 제어 플래그 설정
- sJobKindCD = getUserInfo("jobkindcd"); // 직급코드
- sUserDeptCd = getUserInfo("dutplcecd");
- sUserId = getUserInfo("userid");
- //---------(20101204) 경북대
- //추가
- var ssflag = "";
- if(getUserInfo("dutplceinstcd") != '032' && getUserInfo("dutplceinstcd") != '031') {
- //경북대가 아니면
- if( sJobKindCD == "0330" || sJobKindCD == "0310"){
- ssflag = "Y";
- }else{
- ssflag = "N";
- }
- } else if(getUserInfo("dutplceinstcd") == '032' || getUserInfo("dutplceinstcd") == '031') {
- //경북대이면 03%로 체크한다.
- if( sJobKindCD.substring(0, 2) == "03"){
- ssflag = "Y";
- }else{
- ssflag = "N";
- }
- }
-
- //----------------------------
- //응급의료센터 부서코드 추출_ 경북대 (2011.05.03 Ahn)
- model.makeValue("/root/send/cdgrupid", "'002'");
- model.makeValue("/root/send/srchdd" , getCurrentDate()); // 조회기준일자
- if(submit("TRMNW00001", false)){
- eERDEPTCD = model.getvalue("/root/code/codeinfo/codelist[cdgrupid='002']/cdid");
- }
-
-
- //원본:의사의 경우만
- //if(sJobKindCD == "0330" || sJobKindCD == "0310" || sUserId=="20700469"){//20700469 는 테스트용 김홍점
- if(ssflag=="Y") {
- //---------(20101204) 경북대
- sUserFlag = "2";
- }else{
- sUserFlag = "1";
- }
- model.setValue(sCondPath+"/srchflag", sUserFlag);
-
- }else{
- // sParamInfo = "";
- }
-
- // model.setValue(sCondPath+"/cmbstatusx", "0");
- // model.setValue(sCondPath+"/cmbstatusy", "0");
-
- model.setValue(sCondPath+"/vwctrl_button","4days");
-
- //상단정보 존재 여부 체크
- // 환자정보 조회
- sPamInfo = getGlobalVariable("paminfo");
- model.removenodeset("/root/main/paminfo/pamlist");
- setCSVToNode("/root/main/paminfo",sPamInfo,"pamlist");
- if(sPamInfo == ""){
- //2008-05-14
- fChkTgtPatInfo("disable");
- // model.toggle("case_4daysstnd");
- fSettingPamInfo(sUserFlag);
- model.refresh();
- //messageBox("환자를 선택하십시요","I");
- return;
- }else{
- fChkTgtPatInfo("able");
- model.refresh();
- }
-
- sPid = model.getValue(xPamInfoPath+"/pid"); // 환자번호
- sCretNo = model.getValue(xPamInfoPath+"/cretno"); // 환자 일자별 일련번호
- sInstcd = model.getValue(xPamInfoPath+"/instcd"); // 기관코드
- sIOFlag = model.getValue(xPamInfoPath+"/ioflag"); // 입원/외래 구분
- sWardCD = model.getValue(xPamInfoPath+"/wardcd"); // 병동코드
- sRoomCD = model.getValue(xPamInfoPath+"/roomcd"); // 병실코드
- sIndschacptstat = model.getValue(xPamInfoPath+"/indschacptstat"); //입퇴원구분코드
- sDschdd = model.getValue(xPamInfoPath+"/dschdd"); // 퇴원일자
- sPatNm = model.getValue(xPamInfoPath+"/hngnm"); // 환자명
- sSexAge = model.getValue(xPamInfoPath+"/sex") +"/"+ model.getValue(xPamInfoPath+"/age"); // 성별
- sOrdDeptcd = model.getValue(xPamInfoPath+"/orddeptcd");
- sMedispclid = model.getValue(xPamInfoPath+"/medispclid");
- sSectioncd = model.getValue(xPamInfoPath+"/sectioncd"); // 응급실 구역정보 추가(2011.05.04 ahn)
-
-
- if(sIOFlag == "O"){
- sIndd = model.getValue(xPamInfoPath+"/orddd"); // 진료일자
- }else{
- sIndd = model.getValue(xPamInfoPath+"/indd"); // 입원일자
- }
-
- model.setValue(sCondPath+"/pid", sPid);
-
- model.setValue("/root/main/patinfo/pid", sPid);
- model.setValue("/root/main/patinfo/indd", sIndd);
- model.setValue("/root/main/patinfo/cretno", sCretNo);
- model.setValue("/root/main/patinfo/ordtype", sIOFlag);
- model.setValue("/root/main/patinfo/indschacptstat", sIndschacptstat);
- model.setValue("/root/main/patinfo/dschdd", sDschdd);
- model.setValue("/root/main/patinfo/wardcd", sWardCD);
- model.setValue("/root/main/patinfo/roomcd", sRoomCD);
- model.setValue("/root/main/patinfo/patnm", sPatNm);
- model.setValue("/root/main/patinfo/sexage", sSexAge);
- model.setValue("/root/main/patinfo/orddeptcd", sOrdDeptcd);
- model.setValue("/root/main/patinfo/medispclid", sMedispclid);
- model.setValue("/root/main/patinfo/sectioncd", sSectioncd); // 응급실 구역정보 추가(2011.05.04 ahn)
-
-
- //퇴원/입원 환자 구분에 따른 화면 제어
- if(sIndschacptstat == "D"){
- rdo_srchflag.visible = false; //퇴원환자 조회구분 숨기기
- grp_oderinpatinfo.visible = false;
- grp_inpatinfo.visible = false;
- grp_outpatinfo.visible = true;
- model.setValue(sCondPath+"/recdd",sDschdd);
- }else{
- if(pFlag == "init" || pFlag == "reset"){
- fSettingUserTypeSrch(sUserFlag);
- }
-
- var sRecdate = "";
- // var sRectime = "";
-
- if(getCurrentTime().substr(0,4) < "0700"){
- sRecdate = getDateCalc(getCurrentDate(),1,"-");
- }else{
- sRecdate = getCurrentDate();
- }
-
- model.setValue(sCondPath+"/recdd",sRecdate);
- model.refresh();
-
- if(pFlag == "init"){
-
- if( sUserFlag == "2"){
- //진료과 정보 조회
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/temp/cond/deptgrup/deptgruplist" , "D"); //부서코드 콤보
-
- } else {
- //병동코드 조회
- fGetCareComWardList();
- //내환자 조회
- fGetSettingPatientList();
-
- }
- }
- if(pFlag == "reset" || pFlag == "init"){
- if(sUserFlag == "2"){
- mmbfGetUserComboList("/root/send/reqdata", "/root/temp/cond/doctlist/medispcl" , sOrdDeptcd, "0330", "", "M");
- mmbfGetUserComboList("/root/send/reqdata", "/root/temp/cond/doctlist/atdoct", sOrdDeptcd, "0330", "", "A");
- addComboInstance("/root/temp/cond/doctlist/medispcl", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
- addComboInstance("/root/temp/cond/doctlist/atdoct", "userid^usernm", "-^전체", "usercombo");//의사콤보 전체항목 추가
- //model.setValue("/root/temp/cond/doctlist/atdoct", "-");
- fGetCareComDeptPatList(sOrdDeptcd, sMedispclid , '-', model.getValue("/root/init/mypatsrchflag"));
-
- cmb_deptlist.value = sOrdDeptcd;
- cmb_medispcllist.value = sMedispclid;
- cmb_atdoctlist.value = "-";
- cmb_oderpatlist.value = sPid;
- ipt_orderpid.value = sPid;
- }else{
-
- // 응급실일 경우 (2011.05.04 Ahn)
- //alert(sectioncd);
- fGetWardChngInfo("Y", sWardCD, sSectioncd);
- fGetCareComRoomList(sWardCD);
-
- if(eERFLAG == "Y"){ // 응급실 환자 조회 (2011.05.04 Ahn)
- fGetCareComPatList(sWardCD, sRoomCD, cmb_zone.value);
- }else{
- fGetCareComPatList(sWardCD, sRoomCD);
- }
-
- cmb_wardlist.value = sWardCD;
- cmb_roomlist.value = sRoomCD;
- cmb_patlist.value = sPid;
- ipt_pid.value = sPid;
- cmb_mypatlist.value = sPid;
- if(eERFLAG == "Y"){
- cmb_erpat.value = sPid; // 응급실 환자 지정 (2011.05.04 Ahn)
- }
-
- }
- }else if(pFlag == "patinit"){
- cmb_mypatlist.value = sPid;
- if(eERFLAG == "Y"){
- cmb_erpat.value = sPid; // 응급실 환자 지정 (2011.05.04 Ahn)
- }
- }
- }
-
-
- fSearch("4days");
- var vsinfo = model.getValue(xTPRInfoPath+ "/bodyinfo") + "\n" + model.getValue(xTPRInfoPath+ "/vsinfo");
-
- model.setValue("/root/temp/vsinfo", vsinfo);
- cpt_vsinfo.refresh();
- }
- /**
- * @group :
- * @ver : 2008.10.14
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자별 조회 조건 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingUserTypeSrch(pFlag){
- if( pFlag == "1"){
- grp_outpatinfo.visible = false;
- grp_oderinpatinfo.visible = false;
- grp_inpatinfo.visible = true;
- }else{
- grp_outpatinfo.visible = false;
- grp_oderinpatinfo.visible = true;
- grp_inpatinfo.visible = false;
- }
- }
- /**
- * @group :
- * @ver : 2008.10.14
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자별 조회 조건 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangUserTypeSrch(pFlag){
-
- fTPRviewInit();
- fSettingUserTypeSrch(pFlag);
- var sSettingId1 = "-";
- var sSettingId2 = "-";
- if( pFlag == "1"){
- fGetWardChngInfo("Y", "", ""); // 병동 조회조건으로 초기화
- //병동코드 조회
- fGetCareComWardList();
- //내환자 조회
- fGetSettingPatientList();
- fGetCareComRoomList(sUserDeptCd);
- model.setValue("/root/temp/cond/wardcdgrup/wardcdgruplist", sUserDeptCd);
- cmb_wardlist.refresh();
- }else{
- //진료과 정보 조회
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/temp/cond/deptgrup/deptgruplist" , "D"); //부서코드 콤보
- //---------(20101204) 경북대
- //추가
- var ssflag = "";
- if(getUserInfo("dutplceinstcd") != '032' && getUserInfo("dutplceinstcd") != '031') {
- //경북대가 아니면
- if( sJobKindCD == "0330" || sJobKindCD == "0310"){
- ssflag = "Y";
- }else{
- ssflag = "N";
- }
- } else if(getUserInfo("dutplceinstcd") == '032' || getUserInfo("dutplceinstcd") == '031') {
- //경북대이면 03%로 체크한다.
- if( sJobKindCD.substring(0, 2) == "03"){
- ssflag = "Y";
- }else{
- ssflag = "N";
- }
- }
- //원본:의사의 경우만
- //if(sJobKindCD == "0330" || sJobKindCD == "0310"){
- if(ssflag=="Y") {
- //---------(20101204) 경북대
- mmbfGetUserComboList("/root/send/reqdata", "/root/temp/cond/doctlist/medispcl" , sUserDeptCd, "0330", "", "M");
- mmbfGetUserComboList("/root/send/reqdata", "/root/temp/cond/doctlist/atdoct", sUserDeptCd, "0330", "", "A");
- addComboInstance("/root/temp/cond/doctlist/medispcl", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
- addComboInstance("/root/temp/cond/doctlist/atdoct", "userid^usernm", "-^전체", "usercombo");//의사콤보 전체항목 추가
- if(model.getValue("/root/temp/cond/doctlist/medispcl/usercombo[ userid='"+ sUserId+"']/userid") != ""){
- sSettingId1 = sUserId
- }
- if(model.getValue("/root/temp/cond/doctlist/atdoct/usercombo[ userid='"+ sUserId+"']/userid") != ""){
- sSettingId2 = sUserId
- }
- fGetCareComDeptPatList(sUserDeptCd, sSettingId1 , sSettingId2, model.getValue("/root/init/mypatsrchflag"));
- model.setValue("/root/temp/cond/deptgrup/deptgruplist/dept", sUserDeptCd);
- model.setValue("/root/temp/cond/doctlist/medispcl/usercombo", sSettingId1);
- model.setValue("/root/temp/cond/doctlist/atdoct/usercombo", sSettingId2);
- cmb_deptlist.refresh();
- cmb_medispcllist.refresh();
- cmb_atdoctlist.refresh();
- }else{
- model.setValue("/root/temp/cond/deptgrup/deptgruplist/dept", "-");
- model.removenodeset("/root/temp/cond/doctlist/medispcl/usercombo");
- model.removenodeset("/root/temp/cond/doctlist/atdoct/usercombo");
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2008.09.01
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기 param 존재 하지 않을 경우 환자 선택화면 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingPamInfo(pFlag){
- model.setValue(sCondPath+"/recdd",getCurrentDate());
-
- fChangUserTypeSrch(pFlag);
- }
- /**
- * @group :
- * @ver : 2007.07.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 이전/이후 날짜 Setting
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDateCalc(pFlag, pVWFlag, pTerm){
- switch(pVWFlag){
- case "24hours" :
- model.setValue(sCondPath+"/recdd",getDateCalc(model.getValue(sCondPath+"/recdd"),1,pFlag));
- break;
- case "4days" :
- model.setValue(sCondPath+"/recdd",getDateCalc(model.getValue(sCondPath+"/recdd"),4,pFlag));
- break;
- }
- ipt_4daysrecdd.refresh();
- }
- /**
- * @group :
- * @ver : 2007.07.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 전환
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChageView(pFlag){
- model.setValue(sCondPath+"/vwctrl_button", pFlag);
-
- switch(pFlag){
- // case "24hours" :
- // model.toggle("case_24hoursstnd");
- // //그래프 체크박스 숨김,보임 설정
- // if(model.getValue(sCondPath+"/vwctrl_24hours") == "A"){
- // grp_chkbox.visible = true;
- // }else{
- // grp_chkbox.visible = false;
- // }
- //
- // chk_hourschartinfo.visible = true;
- // chk_dayschartinfo.visible = false;
- // obj_4dayschart.visible = false;
- // obj_24hourschart.visible = true;
- // btn_4daysvw.visible = true;
- // btn_24hoursvw.visible = false;
- // grd_timelist24hours.visible = true;
- // grd_timelist.visible = false;
- // grp_hide.visible = true;
- // model.setValue(sCondPath+"/hourschartinfo","1 2 3 4");
- // break;
- case "4days" :
- // model.toggle("case_4daysstnd");
- //그래프 체크박스 숨김,보임 설정
- // if(model.getValue(sCondPath+"/vwctrl_4days") == "A"){
- // grp_chkbox.visible = true;
- // }else{
- // grp_chkbox.visible = false;
- // }
- // chk_hourschartinfo.visible = false;
- // chk_dayschartinfo.visible = true;
- obj_4dayschart.visible = true;
- // obj_24hourschart.visible = false;
- // btn_4daysvw.visible = false;
- // btn_24hoursvw.visible = true;
- // grd_timelist24hours.visible = false;
- grd_timelist.visible = true;
- // grp_hide.visible = false;
- // model.setValue(sCondPath+"/dayschartinfo","1 2 3 4");
- break;
- }
- }
- /**
- * @group :
- * @ver : 2008.07.30
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @param : 화면 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fTPRviewInit(){
- if(getNodesetCount("/root/temp/cond/patientgrup") < 1){
- return;
- }
- fInitTopInfo();
- model.removenode("/root/main/searchinfo");
-
- model.removeNode("/root/temp/cond/patientgrup");
- grd_timelist.caption = "";
- cpt_vsinfo.value = "";
- //fMakeChart("init24hours");
- fMakeChart("init4days");
- if(getNodesetCount("/root/main/patinfo") > 0){
- model.setValue("/root/main/patinfo/pid", "");
- model.setValue("/root/main/patinfo/indd", "");
- model.setValue("/root/main/patinfo/cretno", "");
- model.setValue("/root/main/patinfo/ordtype", "");
- model.setValue("/root/main/patinfo/indschacptstat", "");
- model.setValue("/root/main/patinfo/dschdd", "");
- model.setValue("/root/main/patinfo/eroutdd", "");
- model.setValue("/root/main/patinfo/patnm", "");
- model.setValue("/root/main/patinfo/sexage", "");
- model.setValue("/root/main/patinfo/wardcd", "");
- model.setValue("/root/main/patinfo/roomcd", "");
- }
- sPid == "";
- sIndd == "";
- sCretNo == "";
- sInstcd == "";
- sIOFlag == "";
- sWardCD == "";
- sRoomCD == "";
- sIndschacptstat == "";
- sDschdd == "";
- sOrdDeptcd == "";
- sMedispclid == "";
- model.setValue(sCondPath+"/pid", "");
- fChkTgtPatInfo("disable");
- }
- /**
- * @group :
- * @ver : 2008.07.02
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @param : 환자 선택 여부확인
- * @return :
- * @---------------------------------------------------
- */
- function fChkTgtPatInfo(pFlag){
- switch(pFlag){
- case "disable":
- btn_4dayrefresh.disabled = true;
- btn_4daysvwctrl.disabled = true;
- // btn_24hoursvw.disabled = true;
- btn_4daybefore.disabled = true;
- btn_4dayafter.disabled = true;
- break;
- case "able":
- btn_4dayrefresh.disabled = false;
- btn_4daysvwctrl.disabled = false;
- // btn_24hoursvw.disabled = false;
- btn_4daybefore.disabled = false;
- btn_4dayafter.disabled = false;
- break;
- }
- }
- /**
- * @group :
- * @ver : 2008.04.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 선택시 상단정보 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetParam(pFlag, pIndex){
-
- if(getNodesetCount("/root/main/paminfo/pamlist") > 0){
- model.removenodeset("root/main/paminfo/pamlist");
- }
-
- var sOrdtype = "";
- var sPid = "";
- var sIndd = "";
- var sCretno = "";
- var sInstcd = "";
- var param = "";
-
- if(pFlag == "SrchPat"){
- sOrdtype = model.getValue("/root/temp/cond/patientgrup/patientgruplist["+ pIndex +"]/ordtype" );
- sPid = model.getValue("/root/temp/cond/patientgrup/patientgruplist["+ pIndex +"]/pid" );
- sIndd = model.getValue("/root/temp/cond/patientgrup/patientgruplist["+ pIndex +"]/indd" );
- sCretno = model.getValue("/root/temp/cond/patientgrup/patientgruplist["+ pIndex +"]/cretno" );
- sInstcd = model.getValue("/root/temp/cond/patientgrup/patientgruplist["+ pIndex +"]/instcd" );
-
- cmb_mypatlist.value = "";
- }else if(pFlag == "SettingPat"){
- sOrdtype = model.getValue("/root/temp/cond/settingpatient/settingpatientlist["+ pIndex +"]/ordtype" );
- sPid = model.getValue("/root/temp/cond/settingpatient/settingpatientlist["+ pIndex +"]/pid" );
- sIndd = model.getValue("/root/temp/cond/settingpatient/settingpatientlist["+ pIndex +"]/indd" );
- sCretno = model.getValue("/root/temp/cond/settingpatient/settingpatientlist["+ pIndex +"]/cretno" );
- sInstcd = model.getValue("/root/temp/cond/settingpatient/settingpatientlist["+ pIndex +"]/instcd" );
- }
-
- param = sOrdtype + "▦"
- + sPid + "▦"
- + sIndd + "▦"
- + sCretno + "▦"
- + sInstcd + "▦"
- + "▦" ;
-
- setParameter("condparam", param);
-
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
-
- if(pFlag == "SrchPat"){
- fInitialize("patinit");
- }else if(pFlag == "SettingPat"){
- fInitialize("reset");
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 시작일자 계산
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCalStartDate(pDate, pTimeFlag){
- var sStartDT = pDate.toDate("YYYYMMDDhhmmss");
- var sTime = "";
- var sRemainder = 0;
-
- if(pTimeFlag != 1 ){
- sRemainder = eval(pDate.substr(10,2))%pTimeFlag;
- }
- sStartDT.setMinutes(sStartDT.getMinutes()-sRemainder);
-
- return sStartDT;
- }
- /**
- * @group :
- * @ver : 2007.07.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 크기 조절(펼치기/ 접기)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fControlGridSize(pFlag){
- switch(pFlag){
- // case "24hours" : // 24시간 화면
- // if(model.getValue(sCondPath+"/vwctrl_24hours") == "A"){ // 펼치기
- // btn_24hoursvwctrl.value = "접기";
- // model.setValue(sCondPath+"/vwctrl_24hours","I");
- // document.all.item("obj_24hourschart").visible = false;
- // document.all.item("obj_24hourschart").refresh();
- // //grd_24hoursheader.visible = false;
- //
- // grp_chkbox.visible = false;
- // chk_hourschartinfo.visible = false;
- // chk_dayschartinfo.visible = false;
- //
- //
- // }else{
- // btn_24hoursvwctrl.value = "펼치기";
- // model.setValue(sCondPath+"/vwctrl_24hours","A");
- // document.all.item("obj_24hourschart").visible = true;
- // document.all.item("obj_24hourschart").refresh();
- // //grd_24hoursheader.visible = true;
- // chk_hourschartinfo.visible = true;
- //
- // grp_chkbox.visible = true;
- // chk_hourschartinfo.visible = true;
- // chk_dayschartinfo.visible = false;
- //
- // }
- // btn_24hoursvwctrl.refresh();
- // //fCreateHeader(pFlag);
- // break;
- case "4days" : // 4일기준 화면
- if(model.getValue(sCondPath+"/vwctrl_4days") == "A"){ // 펼치기
- btn_4daysvwctrl.value = "접기";
- model.setValue(sCondPath+"/vwctrl_4days","I");
- document.all.item("obj_4dayschart").visible = false;
- document.all.item("obj_4dayschart").refresh();
- //grd_4dayschartheader.visible = false;
-
- // grp_chkbox.visible = false;
- // chk_hourschartinfo.visible = false;
- // chk_dayschartinfo.visible = false;
-
- }else{
- btn_4daysvwctrl.value = "펼치기";
- model.setValue(sCondPath+"/vwctrl_4days","A");
- document.all.item("obj_4dayschart").visible = true;
- document.all.item("obj_4dayschart").refresh();
- //grd_4dayschartheader.visible = true;
- chk_dayschartinfo.visible = true;
-
- // grp_chkbox.visible = true;
- // chk_hourschartinfo.visible = false;
- // chk_dayschartinfo.visible = true;
-
- }
- btn_4daysvwctrl.refresh();
- //fCreateHeader(pFlag);
- break;
- }
- }
- /**
- * @group :
- * @ver : 2007.08.14
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트 생성
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeChart(pFlag){
- var Obj_Chart = null;
- var Obj_CheckBox = null;
- var sColCnt = 0;
- var sRecRslt = "";
- var sRecRslt1 = "";
- var sChartInfo = "";
- var sRecDD = "";
- var sRecTM = "";
- var sRecTM4 = "";
- var sRecRsltArr = new Array();
- var sRecRslt1Arr = new Array();
- var iArrSize = 0;
- var iChartPos = 0;
- var idx=0;
- var grdRecTM1="";
- var grdRecTM2="";
- var grdRecDD="";
- var iArrSize = 0;
- var iSeriCnt = 0;
- var iToolsCnt=0;
- var sRecRsltHint = "";
-
- switch(pFlag){
- // case "24hours" :
- // obj_24hourschart.ClearChart();
- // sChartInfo = model.getValue(sCondPath+"/hourschartinfo").split(" ");
- // //obj_24hourschart.RemoveAllSeries();
- // //obj_24hourschart.Axis.RemoveAllCustom();
- //
- // //margin 값 정하기
- // //obj_24hourschart.Panel.MarginTop = 1;
- // obj_24hourschart.Panel.MarginTop = 2;
- // obj_24hourschart.Panel.MarginLeft = 1.5;
- // obj_24hourschart.Panel.MarginRight = 0;
- // obj_24hourschart.Panel.MarginBottom = -6;
- //
- // //하단축 칸 수 정하기와 눈금 없애기
- // obj_24hourschart.Axis.Bottom.SetMinMax (0, 24); //하루 동안 좌표를 표현
- // obj_24hourschart.Axis.Bottom.Increment = 1;
- // obj_24hourschart.Axis.Bottom.MinorTickCount = 1;
- // Obj_Chart = obj_24hourschart;
- // Obj_CheckBox = chk_hourschartinfo;
- // sColCnt = 24;
- // iArrSize = 60;
- // break;
- case "4days" :
- Obj_Chart = obj_4dayschart;
- Obj_CheckBox = chk_dayschartinfo;
- obj_4dayschart.ClearChart();
- sChartInfo = model.getValue(sCondPath+"/dayschartinfo").split(" ");
- //obj_4dayschart.RemoveAllSeries();
- //obj_4dayschart.Axis.RemoveAllCustom();
-
- //margin 값 정하기
- obj_4dayschart.Panel.MarginTop = 2;
- obj_4dayschart.Panel.MarginLeft = 1.5;
- obj_4dayschart.Panel.MarginRight = 0;
- obj_4dayschart.Panel.MarginBottom = -6;
- // obj_4dayschart.Axis.Bottom.TickLength = 16;
-
- //하단축 칸 수 정하기와 눈금 없애기
-
- obj_4dayschart.Axis.Bottom.SetMinMax (0,16); //4일 동안 좌표를 표현 (하루는 DivPerDay만큼 나눠짐)
- obj_4dayschart.Axis.Bottom.Increment = 1;
- obj_4dayschart.Axis.Bottom.MinorTickCount = 5;
- sColCnt = 16;
- iArrSize = 6;
- break;
- // case "init24hours" :
- // sChartInfo = model.getValue(sCondPath+"/hourschartinfo").split(" ");
- // obj_24hourschart.RemoveAllSeries();
- // obj_24hourschart.Axis.RemoveAllCustom();
- //
- // //margin 값 정하기
- // //obj_24hourschart.Panel.MarginTop = 1;
- // obj_24hourschart.Panel.MarginTop = 2;
- // obj_24hourschart.Panel.MarginLeft = 1.5;
- // obj_24hourschart.Panel.MarginRight = 0;
- // obj_24hourschart.Panel.MarginBottom = -6;
- // //obj_24hourschart.Axis.Bottom.TickLength = -5;
- //
- // //하단축 칸 수 정하기와 눈금 없애기
- // obj_24hourschart.Axis.Bottom.SetMinMax (0, 24); //하루 동안 좌표를 표현
- // obj_24hourschart.Axis.Bottom.Increment = 1;
- // obj_24hourschart.Axis.Bottom.MinorTickCount = 1;
- // Obj_Chart = obj_24hourschart;
- // Obj_CheckBox = chk_hourschartinfo;
- // sColCnt = 24;
- // iArrSize = 60;
- // break;
- case "init4days" :
- sChartInfo = model.getValue(sCondPath+"/dayschartinfo").split(" ");
- obj_4dayschart.RemoveAllSeries();
- obj_4dayschart.Axis.RemoveAllCustom();
-
- //margin 값 정하기
- obj_4dayschart.Panel.MarginTop = 2;
- obj_4dayschart.Panel.MarginLeft = 1.5;
- obj_4dayschart.Panel.MarginRight = 0;
- obj_4dayschart.Panel.MarginBottom = -6;
- //obj_4dayschart.Axis.Bottom.TickLength = 0;
- // obj_4dayschart.Axis.Bottom.Labels.MultiLine = True
-
- obj_4dayschart.Axis.Bottom.SetMinMax (0,16); //4일 동안 좌표를 표현 (하루는 DivPerDay만큼 나눠짐)
- obj_4dayschart.Axis.Bottom.Increment = 1;
- obj_4dayschart.Axis.Bottom.MinorTickCount = 5;
- Obj_Chart = obj_4dayschart;
- Obj_CheckBox = chk_dayschartinfo;
- sColCnt = 16;
- iArrSize = 6;
- break;
- }
-
- Obj_Chart.Axis.Bottom.AxisPen.Color = 0x000000;
- Obj_Chart.Axis.Bottom.Labels.Font.Color = 0xffffff; //Obj_Chart.Panel.Color; //하단 축 눈금 명칭 색을 바탕색으로 하여 보이지 않게 처리
- Obj_Chart.Header.Visible = false;
- Obj_Chart.Aspect.View3D = 0; //2d 로 표현하기
- Obj_Chart.Zoom.Enable = false; // zoom 사용하지 않기
- Obj_Chart.Scroll.Enable = false; // scroll 사용하지 않기
- Obj_Chart.Legend.Visible = false; // 그래프 참조 박스 띄우지 않기
- Obj_Chart.Panel.Gradient.Visible = true; // 페널에 그라디언트 적용
- Obj_Chart.Panel.Gradient.StartColor = 0xffffff;
- Obj_Chart.Panel.Gradient.EndColor=0xffffff;
- Obj_Chart.Environment.MouseWheelScroll = false;
- var cus_axis1 = Obj_Chart.Axis.AddCustom(false);
- Obj_Chart.Axis.Custom(0).AxisPen.Color = 0x0000ff;
- Obj_Chart.Axis.Custom(0).Title.Font.Size = 8;
- Obj_Chart.Axis.Custom(0).Title.Font.Bold = true;
- Obj_Chart.Axis.Custom(0).Title.Angle = 90;
- Obj_Chart.Axis.Custom(0).PositionPercent = 0;
- Obj_Chart.Axis.Custom(0).StartPosition = 0;
- Obj_Chart.Axis.Custom(0).EndPosition = 100;
- Obj_Chart.Axis.Custom(0).Automatic = false;
- Obj_Chart.Axis.Custom(0).Maximum = 10;
- Obj_Chart.Axis.Custom(0).Minimum = 0;
- Obj_Chart.Axis.Custom(0).Increment = 1;
-
- iSeriCnt = Obj_CheckBox.length;
- //시간구분선이 생기도록 임의의 널값을 그래프 X축에 세팅
- Obj_Chart.AddSeries(0);//포인트 - Series 4
- Obj_Chart.Series(0).asLine.ClickableLine = 0;//라인을 지나갈때 tool이 먹히게 할지(1) 말지(0)
- Obj_Chart.Series(0).Depth = 1;
- Obj_Chart.Series(0).VerticalAxisCustom = cus_axis1;
- for( var cnt = 0 ; cnt < sColCnt ; cnt++){
- Obj_Chart.Series(0).AddNull("null");
- }
- for(var i = 1 ; i <= Obj_CheckBox.length && !isNull(model.getValue(xChkObsPartInfoPath+"[1]/obspartid")) ; i++){
-
- sChartItem[i-1] = model.getValue(xChkObsPartInfoPath+"[" + i + "]/obspartid");
-
- Obj_CheckBox.item(i-1).attribute("background-color") = sCheckColor[i-1];
- Obj_Chart.AddSeries(0);//포인트 - Series 4
- Obj_Chart.Series(i).VerticalAxisCustom = cus_axis1;
-
- Obj_Chart.Series(i).Color = sLineColor[i-1];
- // alert(Obj_Chart.Series(i).Color+"-------------------"+sLineColor[i]);
- Obj_Chart.Series(i).asLine.LinePen.Width = 2;
- Obj_Chart.Series(i).asLine.Pointer.Visible = true;
- Obj_Chart.Series(i).asLine.Pointer.Style = 1;
- Obj_Chart.Series(i).asLine.Pointer.VerticalSize = 5;
- Obj_Chart.Series(i).asLine.Pointer.HorizontalSize = 5;
- Obj_Chart.Series(i).asLine.ClickableLine = 0;//라인을 지나갈때 tool이 먹히게 할지(1) 말지(0)
- Obj_Chart.Series(i).Depth = i+1;
- if ( Obj_Chart.Tools.Count == 0 ){
-
- Obj_Chart.Tools.Add(8);
- Obj_Chart.Tools.Items(0).asMarksTip.MouseAction = 0;
- Obj_Chart.Tools.Items(0).asMarksTip.Style = 2;//9:y값 x값 0:x값 2:Label
- Obj_Chart.Tools.Items(0).asMarksTip.Delay = 10;
- Obj_Chart.Tools.Items(0).asMarksTip.Series = 4;
- }
-
- if ( Obj_CheckBox.item(i-1).selected ){
-
- switch(pFlag){
- case "4days" :
-
- for( var idx = 1 ; idx <= getNodesetCount(xTotPainInfoPath) ; idx++ ){
- if ( sChartItem[i-1] == model.getValue(xTotPainInfoPath+"["+idx+"]/obspartid") && model.getValue(xTotPainInfoPath+"["+idx+"]/paingbid")!="92"){
- sRecRslt = model.getValue(xTotPainInfoPath+"["+ idx +"]/pnt");
- sRecDD = model.getValue(xTotPainInfoPath+"["+ idx +"]/recdd");
- sRecTM = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2);
-
- //sRecTM4 = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2)+":"+model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(2,4);
-
- for( var iCol = 0 ; iCol < sColCnt ; iCol++ ){
- if ( iCol < (sColCnt-1) ){
- grdRecTM1 = getArrayData(grd_timelist.caption,0,iCol,"|","^").substring(0,2);
- grdRecTM2 = getArrayData(grd_timelist.caption,0,iCol+1,"|","^").substring(0,2);
- } else {
- grdRecTM1 = getArrayData(grd_timelist.caption,0,iCol,"|","^").substring(0,2);
-
- grdRecTM2 = "07";
- }
- // alert(sHeader[1][iCol]+grdRecTM1+"<="+ sRecDD+sRecTM+"<="+sHeader[1][iCol+1]+grdRecTM2+"icol="+iCol );
- if ( sRecDD+sRecTM >= sHeader[1][iCol]+ grdRecTM1
- && sRecDD+sRecTM < sHeader[1][iCol+1]+ grdRecTM2 ){
- if( !isNull(sRecRslt) && fIsNumber(sRecRslt) == true){
- var pos= eval(iCol) + (eval(eval(sRecTM)-eval(grdRecTM1))/iArrSize);
- // sRecRsltHint = model.getValue(xTotPainInfoPath+"["+ idx +"]/obspartnm")+" : "+ model.getValue(xTotPainInfoPath+"["+ idx +"]/valu")
- Obj_Chart.Series(i).AddXY ( pos, eval(sRecRslt), "", sLineColor[i-1]);
-
- }
- }
- }
- }
-
- }//end of for getNodesetCount(xTotPainInfoPath)
- break;
- // case "24hours" :
- // sRecDD = model.getValue(sCondPath+"/recdd");
- //
- // for( var idx = 1 ; idx <= getNodesetCount(xPainInfoPath4) ; idx++ ){
- //
- // if ( sChartItem[i-1] == model.getValue(xPainInfoPath4+"["+idx+"]/obspartid")&& model.getValue(xPainInfoPath4+"["+idx+"]/causeid")!="23"){
- // sRecRslt = model.getValue(xPainInfoPath4+"["+ idx +"]/pnt");
- // sRecDD = model.getValue(xPainInfoPath4+"["+ idx +"]/recdd");
- // sRecTM = model.getValue(xPainInfoPath4+"["+ idx +"]/rectm");
- // //sRecTM4 = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2)+":"+model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(2,4);
- //
- // for( var iCol = 0 ; iCol < sColCnt ; iCol++ ){
- // if ( iCol == 0 ){
- // grdRecTM1 = "0700";
- // grdRecTM2 = getArrayData(grd_timelist24hours.caption,0,0,"|","^").setReplaceWord(":","");
- // } else {
- // grdRecTM1 = getArrayData(grd_timelist24hours.caption,0,iCol-1,"|","^").setReplaceWord(":","");
- // grdRecTM2 = getArrayData(grd_timelist24hours.caption,0,iCol,"|","^").setReplaceWord(":","");
- // }
- //// alert(sHeader[1][iCol]+grdRecTM1+"<="+ sRecDD+sRecTM+"<"+sHeader[1][iCol]+grdRecTM2+"icol="+iCol );
- // if ( sRecDD+sRecTM >= sHeader[1][iCol]+ grdRecTM1
- // && sRecDD+sRecTM < sHeader[1][iCol+1]+ grdRecTM2 ){
- // if( !isNull(sRecRslt) && fIsNumber(sRecRslt) == true){
- // var pos= eval(iCol) + ( eval(eval(sRecTM)-eval(grdRecTM1))/iArrSize);
- // Obj_Chart.Series(i).AddXY (pos, eval(sRecRslt), "", sLineColor[i-1]);
- //
- // }
- //
- // }
- // }
- // }
- // }//end of for getNodesetCount(xTotPainInfoPath)
- //
- // break;
- }
-
- }
- }//end of for getNodesetCount(xChkObsPartInfoPath)
-
- for(var i = 1 ; i <= Obj_CheckBox.length && !isNull(model.getValue(xChkObsPartInfoPath+"[1]/obspartid")) ; i++){
-
- Obj_Chart.AddSeries(4);//포인트 - Series 4
- Obj_Chart.Series(i+iSeriCnt).Marks.Visible = false;
- Obj_Chart.Series(i+iSeriCnt).VerticalAxisCustom = cus_axis1;
-
- Obj_Chart.Series(i+iSeriCnt).Color = sLineColor[i-1];
- Obj_Chart.Series(i+iSeriCnt).Depth = i+iSeriCnt;
-
- Obj_Chart.Series(i+iSeriCnt).Cursor =2020;
- if ( Obj_CheckBox.item(i-1).selected ){
-
- switch(pFlag){
- case "4days" :
-
- for( var idx = 1 ; idx <= getNodesetCount(xTotPainInfoPath) ; idx++ ){
- if ( sChartItem[i-1] == model.getValue(xTotPainInfoPath+"["+idx+"]/obspartid") && model.getValue(xTotPainInfoPath+"["+idx+"]/paingbid")=="92"){
- sRecRslt = model.getValue(xTotPainInfoPath+"["+ idx +"]/pnt");
- sRecDD = model.getValue(xTotPainInfoPath+"["+ idx +"]/recdd");
- sRecTM = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2);
- //sRecTM4 = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2)+":"+model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(2,4);
-
- for( var iCol = 0 ; iCol < sColCnt ; iCol++ ){
- if ( iCol < (sColCnt-1) ){
- grdRecTM1 = getArrayData(grd_timelist.caption,0,iCol,"|","^").substring(0,2);
- grdRecTM2 = getArrayData(grd_timelist.caption,0,iCol+1,"|","^").substring(0,2);
- } else {
- grdRecTM1 = getArrayData(grd_timelist.caption,0,iCol,"|","^").substring(0,2);
- grdRecTM2 = "07";
- }
- // alert(sHeader[1][iCol]+grdRecTM1+"<="+ sRecDD+sRecTM+"<="+sHeader[1][iCol]+grdRecTM2+"icol="+iCol );
- if ( sRecDD+sRecTM >= sHeader[1][iCol]+ grdRecTM1
- && sRecDD+sRecTM < sHeader[1][iCol+1]+ grdRecTM2 ){
- if( !isNull(sRecRslt) && fIsNumber(sRecRslt) == true){
- sRecTM4 = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(2,4);
- var pos= eval(iCol) + (eval(eval(sRecTM)-eval(grdRecTM1))/iArrSize) + (eval(eval(sRecTM4)-eval("00"))/(iArrSize*60)) ;
-
- sRecRsltHint = model.getValue(xTotPainInfoPath+"["+ idx +"]/obspartnm")
- + "("+ model.getValue(xTotPainInfoPath+"["+ idx +"]/direcnm") +")"
- +"\n\n환자반응평가 : "+ model.getValue(xTotPainInfoPath+"["+ idx +"]/valu")
- +"\n약물 및 비약물 중재 : "+ model.getValue(xTotPainInfoPath+"["+ idx +"]/arbitration");
- Obj_Chart.Series(i+iSeriCnt).AddXY (pos, eval(sRecRslt), sRecRsltHint, sLineColor[i-1]);
-
- }
- }
- }
- }
-
- }//end of for getNodesetCount(xTotPainInfoPath)
- // alert(Obj_Chart.Tools.Count);
- break;
- // case "24hours" :
- // sRecDD = model.getValue(sCondPath+"/recdd");
- //
- // for( var idx = 1 ; idx <= getNodesetCount(xPainInfoPath4) ; idx++ ){
- //
- // if ( sChartItem[i-1] == model.getValue(xPainInfoPath4+"["+idx+"]/obspartid")&& model.getValue(xPainInfoPath4+"["+idx+"]/causeid")=="23"){
- // sRecRslt = model.getValue(xPainInfoPath4+"["+ idx +"]/pnt");
- // sRecDD = model.getValue(xPainInfoPath4+"["+ idx +"]/recdd");
- // sRecTM = model.getValue(xPainInfoPath4+"["+ idx +"]/rectm");
- // //sRecTM4 = model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(0,2)+":"+model.getValue(xTotPainInfoPath+"["+ idx +"]/rectm").substring(2,4);
- //
- // for( var iCol = 0 ; iCol < sColCnt ; iCol++ ){
- // if ( iCol == 0 ){
- // grdRecTM1 = "0000";
- // grdRecTM2 = getArrayData(grd_timelist24hours.caption,0,0,"|","^").setReplaceWord(":","");
- // } else {
- // grdRecTM1 = getArrayData(grd_timelist24hours.caption,0,iCol-1,"|","^").setReplaceWord(":","");
- // grdRecTM2 = getArrayData(grd_timelist24hours.caption,0,iCol,"|","^").setReplaceWord(":","");
- // }
- //// alert(sHeader[1][iCol]+grdRecTM1+"<="+ sRecDD+sRecTM+"<"+sHeader[1][iCol]+grdRecTM2+"icol="+iCol );
- // if ( sRecDD+sRecTM >= sHeader[1][iCol]+ grdRecTM1
- // && sRecDD+sRecTM < sHeader[1][iCol]+ grdRecTM2 ){
- // if( !isNull(sRecRslt) && fIsNumber(sRecRslt) == true){
- // var pos= eval(iCol) + ( eval(eval(sRecTM)-eval(grdRecTM1))/iArrSize);
- // Obj_Chart.Series(i-1+iSeriCnt).AddXY (pos, eval(sRecRslt), "", sLineColor[i-1]);
- //
- // }
- // }
- // }
- // }
- // }//end of for getNodesetCount(xTotPainInfoPath)
- // break;
- }
- }
- }//end of for getNodesetCount(xChkObsPartInfoPath)
-
- }
- /**
- * @group :
- * @ver : 2007.07.21
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 문자여부 확인
- * @param : str : 값
- * @return : true / false
- * @---------------------------------------------------
- */
- function fIsNumber(str) {
- str += ''; // 문자열로 변환
- str = str.replace(/^\s*|\s*$/g, ''); // 좌우 공백 제거
- if (str == '' || isNaN(str)) return false;
- return true;
- }
- /**
- * @group :
- * @ver : 2007.08.16
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 Header 생성
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCreateHeader(pFlag){
- var sRecDD = "";
- //var sChartCapNm = "";
- var sGridCapNm = "";
- var sTimeFlag = 0;
- var sCDay = new Array();
- var sDayInfo = "";
- var iDayRow = 0;
- var sDayCountInfo = "";
- var sDateList = "";
- var idx=0;
- sHeader[1] = new Array();
-
- var sCaption = "07:00^13:00^19:00^01:00^07:00^13:00^19:00^01:00^07:00^13:00^19:00^01:00^07:00^13:00^19:00^01:00";
- var sCaption24="07:00^08:00^09:00^10:00^11:00^12:00^13:00^14:00^15:00^16:00^17:00^18:00^19:00^20:00^21:00^22:00^23:00^24:00^01:00^02:00^03:00^04:00^05:00^06:00";
-
- switch(pFlag){
- case "4days" :
-
- var sStartDD = getDateCalc(model.getValue(sCondPath+"/recdd"),3,"-");
- for( idx = 1 ; idx <= grd_timelist.cols ; idx++ ){
- sRecDD = getDateCalc(sStartDD,idx/4,"+");
- sHeader[1][idx-1] = sRecDD;
- }
- sHeader[1][idx]=getDateCalc(model.getValue(sCondPath+"/recdd"),1,"+")
-
- for(var iRow=1; iRow<=1; iRow++){
- for(var iCol=0; iCol<grd_timelist.cols; iCol++){
- if(iRow == 1){
- sGridCapNm += sHeader[iRow][iCol].toDate("YYYYMMDD").getDateFormat("YYYY년 MM월 DD일")+
- " ("+sHeader[iRow][iCol].toDate("YYYYMMDD").getDayOfWeek("k")+")";
- }
- if(iCol != grd_timelist.cols){
- sGridCapNm += "^";
- }
- }
- }
- grd_timelist.caption = sCaption + "|" + sGridCapNm;
- break;
- case "24hours" :
-
- var sStartDD = model.getValue(sCondPath+"/recdd");
- for( var idx = 0 ; idx < grd_timelist24hours.cols ; idx++ ){
- sHeader[1][idx] = sStartDD;
- }
-
- for(var iRow=1; iRow<=1; iRow++){
- for(var iCol=0; iCol<grd_timelist24hours.cols; iCol++){
- if(iRow == 1){
- sGridCapNm += sHeader[iRow][iCol].toDate("YYYYMMDD").getDateFormat("YYYY년 MM월 DD일")+
- " ("+sHeader[iRow][iCol].toDate("YYYYMMDD").getDayOfWeek("k")+")";
- }
- if(iCol != grd_timelist24hours.cols){
- sGridCapNm += "^";
- }
- }
- }
- grd_timelist24hours.caption = sCaption24 + "|" + sGridCapNm;
- break; }
- }
- /**
- * @group :
- * @ver : 2007.08.16
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 임상관찰 기록 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(pFlag){
- if(model.getValue("/root/main/patinfo/pid") == ""){
- messageBox("환자를 선택하십시요","I");
- return;
- }
-
- model.setValue(sCondPath+"/vwctrl_button",pFlag)
-
- model.removenode("/root/send");
- model.makeValue("/root/send/pid", sPid);
- model.makeValue("/root/send/indd", sIndd);
- model.makeValue("/root/send/cretno", sCretNo);
- model.makeValue("/root/send/instcd", sInstcd);
- model.makeValue("/root/send/ioflag", sIOFlag);
- model.makeValue("/root/send/srchdd", model.getValue(sCondPath+"/recdd") );
- model.makeValue("/root/send/fromdd", getDateCalc(model.getValue(sCondPath+"/recdd"),3,'-') );
- model.makeValue("/root/send/todd", model.getValue(sCondPath+"/recdd") );
- model.makeValue("/root/send/vwctrl_button", model.getValue(sCondPath+"/vwctrl_button") );
-
- // submit("TRMNR08401");
- if(submit("TRMNR08401")){
- fCreateHeader(pFlag);
- fSettingCheckBox(pFlag);
- fMakeChart(pFlag);
- fChageView(pFlag);
- if ( getSystemCd().substring(0,3) == "DEV" ){
- fMessageAlert(xPainCountInfoPath);
-
- }
-
- }
- model.refresh();
-
- }
- /**
- * @group :
- * @ver : 2007.08.16
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 점수가7점이상이 3회이상인경우 메시지 팝업
- * @param :
- model.makeValue("/root/send/pid", sPid);
- model.makeValue("/root/send/indd", sIndd);
- model.makeValue("/root/send/cretno", sCretNo);
- model.makeValue("/root/send/vwctrl_button", "dr" );
- * @return :
- * @---------------------------------------------------
- */
- function fMessageAlert(destPath){
- if ( model.getValue(destPath+"/cntpnt") == "Y" ){
- var rtnmsg = messageBox("7점이상의 통증이 3회이상 존재합니다 " ,"Q011");
-
- if ( rtnmsg == 6 ){
- submit("TXMNR08401");//메시지팝업 확인일시 업데이트
- }
- }
-
- }
- /**
- * @group :
- * @ver : 2007.08.16
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 임상관찰 기록 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingCheckBox(pFlag){
-
- switch(pFlag){
- case "4days" :
- var sDaysChart = "";
- for( var idx = 0 ; idx < chk_dayschartinfo.length ; idx++){
-
- if ( idx == 0 ) {
- sDaysChart = chk_dayschartinfo.item(0).value;
- } else {
- sDaysChart += " " + chk_dayschartinfo.item(idx).value;
- }
-
- }
- model.setValue(sCondPath+"/dayschartinfo",sDaysChart);
-
- chk_dayschartinfo.refresh();
- break;
- case "24hours" :
-
- var s24HoursChart = "";
- for( var idx = 0 ; idx < chk_hourschartinfo.length ; idx++){
-
- if ( idx == 0 ) {
- s24HoursChart = chk_hourschartinfo.item(0).value;
- } else {
- s24HoursChart += " " + chk_hourschartinfo.item(idx).value;
- }
-
- }
- model.setValue(sCondPath+"/hourschartinfo",s24HoursChart);
-
- chk_hourschartinfo.refresh();
- break; }
- }
- /**
- * @group :
- * @ver : 2011.03.16
- * @by : 안도영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 구역정보 조회 (응급실인 경우)
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetWardChngInfo(initFlag, wardCd, sectionCd){
- if(initFlag=="Y") {
- var sWardCD = wardCd;
- }
- else{
- //var sWardCD = model.getValue("/root/cond/wardcd");
- var sWardCD = cmb_wardlist.value;
- }
-
- if ( sWardCD == eERDEPTCD) {
- eERFLAG = "Y";
- }else{
- eERFLAG = "";
- }
-
- //응급실인 경우 구역정보 추가조회
- if(eERFLAG == "Y"){ // 응급실
- fGetZoneList();
- //copyNodeset("/root/temp2/zoneinfo", "/root/temp/zoneinfo");
- caption7.attribute("text") = "구 역 :";
- cmb_roomlist.visible = "false";
- cmb_erpat.visible = "true";
- cmb_patlist.visible = "false";
- cmb_zone.visible = "true";
-
- //ipt_pid.attribute("left") = 539; // 위치 변경
- //ipt_pid.attribute("top") = 40;
- //btn_patSearch.attribute("left") = 617; // 위치 변경
- //btn_patSearch.attribute("top") = 41; // 위치 변경
- caption9.visible = "false";
- cmb_mypatlist.visible = "false";
-
- if(initFlag=="Y"){ // 처음 상단 정보로 화면 열릴 때
- model.setValue("/root/main/cond/zonecd", (sectionCd == "") ? "-" : sectionCd);
- }else{
- model.setValue("/root/main/cond/zonecd", "-"); // 'All'로 default
- }
-
-
- }else{
- caption7.attribute("text") = "병 실 :";
- cmb_roomlist.visible = "true";
- cmb_erpat.visible = "false";
- cmb_patlist.visible = "true"
- cmb_zone.visible = "false";
- //ipt_pid.attribute("left") = 669; // 기존 위치
- //ipt_pid.attribute("top") = 15;
- //btn_patSearch.attribute("left") = 747; // 기존 위치
- //btn_patSearch.attribute("top") = 16;
-
- caption9.visible = "true";
- cmb_mypatlist.visible = "true";
-
- model.setValue("/root/main/cond/zonecd", "");
-
- }
- //ctn_room.refresh();
- cmb_zone.refresh();
- cmb_roomlist.refresh();
- cmb_erpat.refresh();
- cmb_patlist.refresh();
- }
- function RgbToGraph(h) { return window.rgb(HexToR(h),HexToG(h),HexToB(h)) }
- function HexToR(h) { return parseInt((cutHex(h)).substring(0,2),16) }
- function HexToG(h) { return parseInt((cutHex(h)).substring(2,4),16) }
- function HexToB(h) { return parseInt((cutHex(h)).substring(4,6),16) }
- function cutHex(h) { return (h.charAt(0)=="#") ? h.substring(1,7) : h}
|