1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[var sORDERBY = "desc";
- var sMEDIALERT = ""; //의료정보 전달사항
- var sDRALERT = ""; //의사 전달사항
- // 이전 등록번호, 입원일자, 생성번호를 저장하여, 환자정보가 다른 경우 기록지를 새로 조회하기 설정해 둠
- // 2008. 1. 7. 오지훈
- var sBFPID = ""; //이전등록번호
- var sBFORDDD = ""; //이전입원일자
- var sBFCRETNO = ""; //이전생성번호
- var getDataG = "";
- function fInitialize()
- {
- //차트분석관리 화면 연동 처리
- if(frmf_checkOpener()){
- var recvparam = opener.frmf_getParameter("SMMRI01700_Param");
-
- if(!utlf_isNull(recvparam)){
- recvparam = utlf_transNullToEmpty(recvparam).split("▩");
- data = utlf_transNullToEmpty(recvparam[1]).split("▦");
- ds_main_cond_unpreppatbase.setColumn(0, "pid", data[0]);
-
- fReqGetUnPrepPatChosInfo(data[0], "I", "A");
-
- cmb_chosinfo.index = 0;
- var pid = ds_main_patinfo_pathistlist.lookup("rowcnt", cmb_chosinfo.value, "pid");
- var indd = ds_main_patinfo_pathistlist.lookup("rowcnt", cmb_chosinfo.value, "orddd");
- var cretno = ds_main_patinfo_pathistlist.lookup("rowcnt", cmb_chosinfo.value, "cretno");
- var hngnm = ds_main_patinfo_pathistlist.lookup("rowcnt", cmb_chosinfo.value, "hngnm");
- ds_main_cond_unpreppatbase.setColumn(0, "pid" , pid);
- ds_main_cond_unpreppatbase.setColumn(0, "indd" , indd);
- ds_main_cond_unpreppatbase.setColumn(0, "cretno", cretno);
- ds_main_cond_unpreppatbase.setColumn(0, "hngnm" , hngnm);
-
- frmf_inputEnterKey("cmb_chosinfo", "onitemchanged", new ItemChangeEventInfo );
- }
- }
- var arrParam = [{dsNm: "ds_init_M0501", cdGrpId: "M0501"},
- {dsNm: "ds_init_M0502", cdGrpId: "M0502"},
- {dsNm: "ds_init_M0503", cdGrpId: "M0503"}];
- appf_getCodeList(arrParam);
- }
- function fn_unprepflag(){
- var getData = String(chk_unprepflag.getData()).replace(","," ");
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstat", getData);
- if(utlf_isSearchString(getDataG, "8") == true){
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
-
- var getData = String(chk_unprepflag.getData()).replace(","," ");
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstat", getData);
- }
- getDataG = getData;
-
- //전체
- var unprepstatA = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "-");
-
- if(unprepstatA == true){
- chk_unprepflag.setCheckAll(false);
- chk_unprepflag.components[2].enable = false;
- chk_unprepflag.components[3].enable = false;
- chk_unprepflag.components[4].enable = false;
- chk_unprepflag.components[5].enable = false;
- chk_unprepflag.components[6].enable = false;
- chk_unprepflag.components[7].enable = false;
-
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstat", "-");
- chk_unprepflag.setData(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat").split(" "), " ", false);
- }else{
- chk_unprepflag.components[2].enable = true;
- chk_unprepflag.components[3].enable = true;
- chk_unprepflag.components[4].enable = true;
- chk_unprepflag.components[5].enable = true;
- chk_unprepflag.components[6].enable = true;
- chk_unprepflag.components[7].enable = true;
- }
-
- var unprepstatDel = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "8");
- if(unprepstatDel == true){
- for(var i = 1; i < ds_checkList.rowcount - 1;i++){
- var objChk = eval("chk_" + i);
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstat", "8");
- }
-
- //배치미비
- var unprepstatB = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "0");
-
- if(unprepstatB == true){
- var objChk = eval("chk_" + "0");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
-
- var unprepstatC = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "1");
-
- if(unprepstatC == true){
- var objChk = eval("chk_" + "0");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
-
- var unprepstatD = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "2");
-
- if(unprepstatD == true){
- var objChk = eval("chk_" + "0");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
-
- var unprepstatR = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "3");
-
- if(unprepstatR == true){
- var objChk = eval("chk_" + "0");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
-
- var unprepstatS = utlf_isSearchString(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"), "4");
-
- if(unprepstatS == true){
- var objChk = eval("chk_" + "0");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- var objChk = eval("chk_" + "6");
- objChk.enableevent =false;
- objChk.value = "";
- objChk.enableevent =true;
- }
- var getData = String(chk_unprepflag.getData()).replace(","," ");
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstat", getData);
- }
- /**
- * @desc 미비항목코드 Count예외코드 조회
- */
- function reqGetUnPrepBaseExptCnt(){
- ds_send_reqdata.clearData();
-
- var oParam = {};
- oParam.id = "TRMRI01703";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepBaseExptCnt";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_unprepiteminfo_unprepiteminfo=unprepiteminfo";
- oParam.async = false;
- tranf_submit(oParam);
- }
- /**
- * @desc 미비환자 내원정보 조회
- */
- function fReqGetUnPrepPatChosInfo(pid, ioflag, dschflag){
-
- ds_send_reqdata.clearData();
- ds_send_reqdata.addColumn("pid", "string");
- ds_send_reqdata.addColumn("ioflag", "string");
- ds_send_reqdata.addColumn("dschflag", "string");
- var nRow = ds_send_reqdata.addRow();
-
- ds_send_reqdata.setColumn(nRow, "pid", pid);
- ds_send_reqdata.setColumn(nRow, "ioflag", ioflag);
- ds_send_reqdata.setColumn(nRow, "dschflag", dschflag);
- var oParam = {};
- oParam.id = "TRMRI02605";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepPatChosInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_patinfo_pathistlist=pathistlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMRI02605";
- tranf_submit(oParam);
- }
- /**
- * @desc 미비삭제
- */
- function fDelUnPrepRecInfo(){
-
- var len = grdf_getSelectedRows(grd_unprepreclist);
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- for(var i = len.length -1 ; i >= 0; i--){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "i"){
- ds_main_unpreprecinfo_unprepreclist.deleteRow(currow);
- }else{
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#ff0000");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "d");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "9");
- }
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- }
- /**
- * @desc 미비 정보 저장
- */
- function fSaveUnPrepInfo(){
- var savenodelist = ds_main_unpreprecinfo_unprepreclist.getCaseCount("!utlf_isNull(status)");
- var srchflag = ds_main_cond.getColumn(0, "srchflag");
- if(srchflag == "pat"){
- var srchnodelist = ds_main_cond_unpreppatbase;
- }else{
- var srchnodelist = ds_main_cond_unprepdrbase;
- }
-
- if(savenodelist == 0){
- sysf_messageBox("저장할 정보가", "I004");
- return;
- }else{
- grd_patreclist.visible = false;
-
- ds_send_savedata.clearData();
- ds_main_unpreprecinfo_unprepreclist.filter("!utlf_isNull(status)");
- ds_send_savedata.copyData(ds_main_unpreprecinfo_unprepreclist, true);
- ds_main_unpreprecinfo_unprepreclist.filter("");
- ds_send_srchdata.copyData(srchnodelist, true);
-
- dsf_makeValue(ds_send, "savedata", "string", dsf_getDsCSV(ds_send_savedata));
- dsf_makeValue(ds_send, "srchdata", "string", dsf_getDsCSV(ds_send_srchdata));
-
- dsf_setDefaultVal(ds_send_savedata, "drcnfmrid:-");
-
- var oParam = {};
- oParam.id = "TXMRI02101";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqExeSaveUnPrepRecList";
- oParam.inds = "savedata=ds_send_savedata srchdata=ds_send_srchdata";
- oParam.outds = "ds_main_unpreprecinfo_unprepreclist=unprepreclist";
- oParam.async = false;
- oParam.callback = "cf_TXMRI02101";
- tranf_submit(oParam);
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("check", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolor", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolorcheck", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkDelcolor", "string");
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepstat", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgorddeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrid", "string");
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount; i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepstat", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgorddeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "orddeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrid", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrid"));
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- if(arErrorCode.pop("TXMRI02101") > -1){
- fDoMergeUnPrepRecList();
- }
- }
- }
- function cf_TXMRI02101(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /**
- * @desc 미비기록 리스트 조회, 의사정보 기준
- */
- function fReqGetUnPrepRecDrBaseList(unprepsign){
- //미비기록추가, 저장 이후에 현재 조회된 미비기록리스트를 재조회하기 위해 설정함
- ds_main_cond.setColumn(0, "srchflag", "dr");
- ds_main_cond_unprepdrbase.setColumn(0, "scrnflag" , "unprepdrbase");
- ds_main_cond_unprepdrbase.setColumn(0, "unprepsign", unprepsign); //실제미비리스트 조회시
-
- //미비의사명이 없는 경우, 조회조건의 의사ID를 삭제
- if(utlf_isNull(ipt_unprepdrnm.text)){
- ds_main_cond_unprepdrbase.setColumn(0, "unprepdrid", "");
- }
-
- //조회조건 미비상태값 설정
- var unprepstat = utlf_transNullToEmpty(ds_main_cond_unprepdrbase.getColumn(0, "unprepstat"));
- if(unprepstat != "-"){
- var unprepstatArray = unprepstat.split(' ');
- var cond = "";
- for(var i = 0; i < unprepstatArray.length; i++){
- cond += unprepstatArray[i] + '\',\'';
- }
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstatlist", utlf_transNullToEmpty(cond).substr(0, utlf_transNullToEmpty(cond).length - 3));
- }
-
- ds_send_reqdata.clearData();
- ds_send_reqdata.copyData(ds_main_cond_unprepdrbase);
-
- var oParam = {};
- oParam.id = "TRMRI02107";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepRecList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_unpreprecinfo_unprepreclist=unprepreclist ds_main_unpreprecinfo_unprepreccnt=unprepreccnt";
- oParam.async = false;
- oParam.callback = "cf_TRMRI02107";
- tranf_submit(oParam);
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("check", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolor", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolorcheck", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkDelcolor", "string");
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepstat", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgorddeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrid", "string");
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount; i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepstat", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgorddeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "orddeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrid", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrid"));
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
-
- if(arErrorCode.pop("TRMRI02107") > -1){
- fDoMergeUnPrepRecList();
- }
- }
- function cf_TRMRI02107(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /**
- * @desc 미비기록관리 merge
- */
- function fDoMergeUnPrepRecList()
- {
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount ;i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(0, "bkcolor", "");
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
-
- var patcnt = 0;
- var reccnt = 0;
- var icnt = 0;
- var startrow = 1;
- var color = "#ffffcc"; // 그리드 배경색
- var checkcol = grd_unprepreclist.getBindCellIndex("body", "check");
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount; i++)
- {
- var unprepitemcd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepitemcd");
- var formrecseq = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "formrecseq");
- var delyn = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "delyn");
- var result = utlf_transNullToEmpty(ds_main_unprepiteminfo_unprepiteminfo.lookup("unprepitemcd", unprepitemcd, "unprepitemcd"));
-
- var deldt = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "deldt");
- var deluserid = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "deluserid");
- var delusernm = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "delusernm");
- var formcd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "formcd");
- if(utlf_isNull(result)){
- reccnt++;
- }
-
- if(i == 0){
- patcnt++;
- var orgpid = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "pid");
- var orgdschdd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "dschdd");
- var orgindd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "indd");
-
- startrow = 0;
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolor", color);
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", color);
-
- if (formcd != "0000002022") { //마취기록지가 아닐때(20131031 이윤주)
- if(formrecseq <= 0 ){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", "#ff0000");// 기록지 연결안된 미비내역(빨간색)
- }
- }
- if(delyn == "Y" || (formrecseq == "-1" && !utlf_isNull(deluserid) && !utlf_isNull(deldt))){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolor", "#999999");// 삭제된 기록지(연한 회색)
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", "#999999");
- }
- continue;
- }
-
- var pid = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "pid");
- var indd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "indd");
- var dschdd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "dschdd");
-
- if(orgpid == pid && orgdschdd == dschdd && orgindd == indd){
- // grd_unprepreclist.mergeByFree(startrow, grd_unprepreclist.colRef("pid") , i, grd_unprepreclist.colRef("pid"));
- // grd_unprepreclist.mergeByFree(startrow, grd_unprepreclist.colRef("hngnm") , i, grd_unprepreclist.colRef("hngnm"));
- // grd_unprepreclist.mergeByFree(startrow, grd_unprepreclist.colRef("dschdd") , i, grd_unprepreclist.colRef("dschdd"));
- // grd_unprepreclist.mergeByFree(startrow, grd_unprepreclist.colRef("dschdeptnm"), i, grd_unprepreclist.colRef("dschdeptnm"));
- // grd_unprepreclist.mergeByFree(startrow, grd_unprepreclist.colRef("medispclnm"), i, grd_unprepreclist.colRef("medispclnm"));
- }
- else
- {
- patcnt++;
- var orgpid = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "pid");
- var orgdschdd= ds_main_unpreprecinfo_unprepreclist.getColumn(i, "dschdd");
- var orgindd = ds_main_unpreprecinfo_unprepreclist.getColumn(i, "indd");
- startrow = i;
- if(color == "#ffffcc"){
- color = "#ffffff"; // 투명색
- }else{
- color = "#ffffcc"; // 그리드 배경색(연한 노란색)
- }
- }
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolor", color);
-
- if (formcd != "0000002022") { //마취기록지가 아닐때(20131031 이윤주)
- if(formrecseq <= 0 || utlf_isNull(formrecseq)){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", "#ff0000");// 기록지 연결안된 미비내역(빨간색)
- }else{
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "bkcolor"));
- }
- }else{
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolorcheck", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "bkcolor"));
- }
-
- if(delyn == "Y" || (formrecseq == "-1" && !utlf_isNull(deluserid) && !utlf_isNull(deldt))){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "bkcolor", "#999999");// 삭제된 기록지(연한 회색)
- }
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
-
- ds_main_cond.setColumn(0, "patcnt", patcnt);
- ds_main_cond.setColumn(0, "reccnt", reccnt);
- }
- /**
- * @desc 미비의사 조회
- */
- function fReqGetUnPrepDrSmplList(srchflag, srchdata){
- ds_send_reqdata.clearData();
- dsf_makeValue(ds_send_reqdata, "srchflag", "string", srchflag);
- dsf_makeValue(ds_send_reqdata, "srchdata", "string", srchdata);
- var oParam = {};
- oParam.id = "TRMRI02901";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepDrSmplList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_temp_userinfo_usercombo=usercombo";
- oParam.async = false;
- tranf_submit(oParam);
- }
- /**
- * @desc 미비기록 리스트 조회, 환자정보 기준
- */
- function fReqGetUnPrepRecList(){
- ds_main_cond.setColumn(0, "srchflag", "pat");
- ds_main_cond_unpreppatbase.setColumn(0, "scrnflag", "unpreppatbase");
-
- ds_send_reqdata.copyData(ds_main_cond_unpreppatbase);
-
- var oParam = {};
- oParam.id = "TRMRI02106";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepRecList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_unpreprecinfo_unprepreclist=unprepreclist";
- oParam.async = false;
- oParam.callback = "cf_TRMRI02106";
- tranf_submit(oParam);
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("check", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolor", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolorcheck", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkDelcolor", "string");
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepstat", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgorddeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrid", "string");
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount; i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepstat", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgorddeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "orddeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrid", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrid"));
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
-
- if(arErrorCode.pop("TRMRI02106") > -1){
- fDoMergeUnPrepRecList();
- }
- }
- function cf_TRMRI02106(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /**
- * @desc 환자 기록지 조회
- */
- function fReqGetPatRecList(pid, orddd, cretno){
- ds_send_recreqdata.clearData();
- dsf_makeValue(ds_send_recreqdata, "pid", "string", pid);
- dsf_makeValue(ds_send_recreqdata, "orddd", "string", orddd);
- dsf_makeValue(ds_send_recreqdata, "cretno", "string", cretno);
-
- var oParam = {};
- oParam.id = "TRMRI01704";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetPatRecList";
- oParam.inds = "req=ds_send_recreqdata";
- oParam.outds = "ds_main_patreclist_patreclist=patreclist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_main_patreclist_patreclist.addColumn("check", "string");
- }
- /**
- * @desc 미비기록 load
- */
- function fLoadUnPrepFormRec(){
- var currow = ds_main_unpreprecinfo_unprepreclist.rowposition;
- if(currow < 0){
- return;
- }
-
- var pid = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "pid");
- var indd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "indd");
- var cretno = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "cretno");
- var formcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "formcd");
- var srcformcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "srcformcd");
- var dschdd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "dschdd");
- var oprsrvno = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "oprsrvno");
- var orddrid = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "unprepdrid");
- var orddeptcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "indschdeptcd");
- var formrecseq = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "formrecseq");
- var formrecdd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "formrecdd");
- var instcd = sysf_getUserInfo("dutplceinstcd");
-
- //2009-07-08 오후 8:03:43 강지훈 수정 : 20091002로 하드코딩된 내역을 공통코드 "M0546" 유형코드 "M0037" 로 관리
- var opendd = utlf_transNullToEmpty(ds_init_openday_M0037M0546.getColumn(0, "cdid")); // 병원별 오픈일
- var preopendd = opendd.toDate().getAddDate(-1, "D").getDateFormat();
-
- var preOpenMonth = utlf_transNullToEmpty(preopendd).substr(4,6);
- var preOpenDay = utlf_transNullToEmpty(preopendd).substr(6,8);
-
- if(formrecdd <= preopendd){
- sysf_messageBox(preOpenMonth+"월 "+preOpenDay+"일까지 발생된 미비기록은 구OCS프로그램과 종이에 작성", "I008");
- return;
- }
-
- if((srcformcd != "0000002022")){
- // 2009-11-02 이경희
- // 오픈이전 기록 메시지와 기록지 연결이 안된 미비 메시지와 순서를 변경함
- if(formrecseq == 0 || formrecseq == -1){
- sysf_messageBox("기록지와 연결이 되지 않은 미비", "I009");
- return;
- }
- }
- // 2009.07.01 이경희
- // 환자의 퇴원일이 해당 일자 이후인 경우. 즉 재원중인 환자는 dschdd를 현재일자로 넘긴다.
- var today = utlf_getCurrentDate();
- if(dschdd > today) {
- dschdd = today
- }
-
- //수술기록인 경우, 상단정보 처리
- if(srcformcd == "0000000676" || srcformcd == "0000002022" || srcformcd == "0000000737"){
- var param = "T" + "▦" +
- pid + "▦" +
- formrecdd + "▦" +
- cretno + "▦" +
- instcd + "▦" +
- "" + "▦" +
- "" + "▦" +
- "I" + "▦" +
- "F" + "▦" +
- oprsrvno + "▦" +
- "" + "▦" +
- dschdd;
- frmf_setParameter("condparam", param);
- //수술기록 이외의 상단정보 처리
- }else{
- var param = "I" + "▦" +
- pid + "▦" +
- indd + "▦" +
- cretno + "▦" +
- instcd + "▦" +
- dschdd;
- frmf_setParameter("condparam", param);
- }
-
- sysf_setGlobalVariable("linked_formcd" , formcd , "emr");
- sysf_setGlobalVariable("linked_formrecseq", formrecseq , "emr");
- sysf_setGlobalVariable("linked_formrecdd" , formrecdd , "emr");
- //modal("SPMMO08900", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- appf_initPatientInfo(param);
-
- var gmainwnd = frmf_getMainViewer();
- frmf_setParameter("SMMMO04100_ANSWCNT", "");
- /*
- gmainwnd.javascript.navigate("SMMMR00100");
- */
-
- // 2013.10.15 김영기 마취기록지 및 마취전 평가 및 협진서 추가를 위한 로직 수정
- if(srcformcd == "0000002022" || srcformcd == "0000000737"){ //서식코드가 마취기록지 및 마취전 평가 일경우
- //gmainwnd.navigate("SMMMR03700");
- gmainwnd.frmf_openForm("SMMMR03700", null, null);
- }else{
- //gmainwnd.navigate("SMMMR00100");
- gmainwnd.frmf_openForm("SMMMR00100", null, null);
- }
- }
- /**
- * @desc 미비과 변경
- */
- function fReqSetUnPrepDeptCD(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- //trace(len)
- var orddeptcd = ds_init.getColumn(0, "unprepdeptcd");
- var orddeptnm = group1.combo1.text;
- for(var i = 0; i < len.length; i++){
- var currow = len[i]
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status" , "di");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "orddeptcd" , orddeptcd);
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- var savenodelist = ds_main_unpreprecinfo_unprepreclist.getCaseCount("status=='di'");
- var srchnodelist = ds_send_reqdata.rowcount;
- if(savenodelist == 0){
- sysf_messageBox("저장할 정보가", "I004");
- return;
-
- }else{
- // var savedata = getNodeListCSV(savenodelist);
- // var srchdata = getNodeListCSV(srchnodelist);
- ds_send_savedata.clearData();
- ds_main_unpreprecinfo_unprepreclist.filter("status=='di'");
- ds_send_savedata.copyData(ds_main_unpreprecinfo_unprepreclist, true);
- ds_main_unpreprecinfo_unprepreclist.filter("");
- ds_send_srchdata.copyData(ds_send_reqdata);
- var oParam = {};
- oParam.id = "TXMRI01702";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqSetUnPrepDeptCD";
- oParam.inds = "savedata=ds_send_savedata srchdata=ds_send_srchdata";
- oParam.outds = "ds_main_unpreprecinfo_unprepreclist=unprepreclist";
- oParam.async = false;
- oParam.callback = "cf_TXMRI01702";
- tranf_submit(oParam);
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("check", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolor", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkcolorcheck", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("bkDelcolor", "string");
-
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepstat", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptnm", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgdetldeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgorddeptcd", "string");
- ds_main_unpreprecinfo_unprepreclist.addColumn("orgunprepdrid", "string");
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = false;
- for(var i = 0; i < ds_main_unpreprecinfo_unprepreclist.rowcount; i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepstat", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepstat"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptnm", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptnm"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgdetldeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "detldeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgorddeptcd", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "orddeptcd"));
- ds_main_unpreprecinfo_unprepreclist.setColumn(i, "orgunprepdrid", ds_main_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrid"));
- }
- ds_main_unpreprecinfo_unprepreclist.updatecontrol = true;
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
-
- if(arErrorCode.pop("TXMRI01702") > -1){
- // grd_unprepreclist.allstyle("data", "color") = "#000000";
- // grd_unprepreclist.mergeCells = "bycol";
- // grd_unprepreclist.mergeCol(grd_unprepreclist.colRef("pid")) = true;
- // grd_unprepreclist.mergeCol(grd_unprepreclist.colRef("hngnm"))= true;
- // grd_unprepreclist.merge();
- }
- }
- }
- function cf_TXMRI01702(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /**
- * @desc 미비 Excel화일 생성
- */
- function reqGetUnPrepCreateExcelFile(){//cms
- var fd = new FileDialog();
- var files = fd.open("Excel Export", FileDialog.SAVE ,"%MYDOCUMENT%", "");
- if (utlf_isNull(files))
- {
- return;
- }
-
- if(!utlf_isNull(files)){
- ds_send_reqdata.clearData();
-
- //화일 디렉토리 위치, 화일명을 받는다.
- var filenm = files.filename;
- var filepath = files.fullpath.replace(filenm, "");
- var colref = "pid^hngnm^dschdeptnm^dschdd^indd^medispclnm^unprepstatnm^doctkindflag^unprepdrnm^unprepdeptnm^formnm^unprepitemnm^formrecdd^medirecalertcnts^drcnfmdt^dralertcnts^fstrgstrnm^fstrgstdt^lastupdtrnm^lastupdtdt";
- //조회시 조건을 설정하여 CSV형태로 전환하여 조회
-
- ds_main_cond.setColumn(0, "srchflag", "dr");
- var unprepstat = ds_main_cond_unprepdrbase.getColumn(0, "unprepstat");
- if(unprepstat != "-"){
- var unprepstatArray = utlf_transNullToEmpty(unprepstat).split(' ');
- var cond = "";
- for(var i = 0; i < unprepstatArray.length; i++){
- cond += unprepstatArray[i] + '\',\'';
- }
- ds_main_cond_unprepdrbase.setColumn(0, "unprepstatlist", utlf_transNullToEmpty(cond).substr(0, utlf_transNullToEmpty(cond).length - 3));
- }
-
- //미비의사명이 없는 경우, ID를 clear
- if(utlf_isNull(ipt_unprepdrnm.text)){
- ds_main_cond_unprepdrbase.setColumn(0, "unprepdrid", "");
- }
- ds_send_reqdata.clearData();
- ds_main_cond_unprepdrbase.setColumn(0, "unprepsign", "N");
- dsf_makeValue(ds_main_cond_unprepdrbase, "scrnflag", "string", "unprepdrbase");
-
- //전체조회 월별로 나눠서 file로 다운로드처리
- //2008. 12. 22 오지훈
- var dayflag = ds_main_cond_unprepdrbase.getColumn(0, "dayflag");
- if(dayflag == "N"){
- ds_main_cond_unprepdrbase.setColumn(0, "dayflag", "Y");
-
- // 2009-07-25 이경희
- // 엑셀저장시 2009/07/01로 고정된 부분을 수정.
- //var startdate = "20070101";
- var opendd = ds_init_openday_M0037M0546.getColumn(0, "cdid"); // 병원별 오픈일
- var startdate = opendd.toDate().getDateFormat("YYYYMM") + "01"; // 오픈한 달의 첫날부터로 설정
-
- var enddate = utlf_getCurrentDate();
-
- }else{
- ds_main_cond_unprepdrbase.setColumn(0, "dayflag", "Y");
- var startdate = ds_main_cond_unprepdrbase.getColumn(0, "fromdd");
- var enddate = ds_main_cond_unprepdrbase.getColumn(0, "todd");
- var backupflag = "Y";
- }
-
- var steps = parseInt(ds_main_cond_excelcond.getColumn(0, "steps")) - 1;
- var lastdd = "";
- var enddd = "";
-
- //시작일자와 종료일자가 동일한 달인 경우(monthcnt == 0), 종료일자는 그대로
- //동일한 달이 아닌 경우, 그 달의 마지막 날짜를 concat한다.
- while(enddate > startdate){
-
- enddd = utlf_transNullToEmpty(((startdate.toDate()).getAddDate(steps, "M")).getDateFormat());
- if(enddd.substr(0, 6) >= enddate.substr(0, 6)){
- enddd = enddate;
-
- }else{
- var dd1 = enddd.substr(0, 6).concat("01");
- var dd2 = ((dd1.toDate()).getAddDate(1, "M")).getDateFormat();
-
- lastdd = utlf_getDateInterval(dd1, dd2);
- enddd = enddd.substring(0, 6).concat(lastdd);
- }
- ds_main_cond_unprepdrbase.setColumn(0, "fromdd", startdate);
- ds_main_cond_unprepdrbase.setColumn(0, "todd" , enddd);
- var condnode = ds_main_cond_unprepdrbase;
- dsf_makeValue(ds_send_reqdata, "colref" , "string", colref);
- dsf_makeValue(ds_send_reqdata, "sqlid" , "string", "getUnPrepRecList");
- dsf_makeValue(ds_send_reqdata, "srchcond", "string", doSrchCondCSV(condnode, "^", "|"));
- var oParam = {};
- oParam.id = "TRMRI02108";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepCreateExcelFile";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_attachfile=attachfile";
- oParam.async = false;
- tranf_submit(oParam);
- dsf_readFileFromDs(filepath + filenm + "_" + startdate + "_" + enddd + ".xls", ds_attachfile, 0, "filedata"); // 파일저장
- startdate = ((startdate.toDate()).getAddDate(steps + 1, "M")).getDateFormat();
- }
- //원래 기간 조회가 아니었으므로 기간조회를 N으로 처리함
- if(backupflag == "Y"){
- ds_main_cond_unprepdrbase.setColumn(0, "dayflag", "N");
- }
- }else{
- return;
- }
- }
- function doSrchCondCSV(nodeList, sColSep, sRowSep){
- if( nodeList.rowcount == 0 ){
- return;
- }
- var rCSV = "";
-
- for(var i = 0; i < ds_main_cond_unprepdrbase.colcount - 1; i++){
- rCSV += ds_main_cond_unprepdrbase.getColID(i) + sColSep;
- }
- rCSV += ds_main_cond_unprepdrbase.getColID(i) + sRowSep;
-
- for(var i = 0; i < ds_main_cond_unprepdrbase.rowcount ;i++){
- for(var j = 0; j < ds_main_cond_unprepdrbase.colcount - 1;j++ ){
- rCSV += ds_main_cond_unprepdrbase.getColumn(i, j) + sColSep;
- }
- rCSV += ds_main_cond_unprepdrbase.getColumn(i, j) + sRowSep;
- }
- return rCSV;
- }
- /**
- * @desc 세부과설정
- */
- function fSetDetlDeptCD(){
- var loopcnt = grdf_getSelectedRows(grd_unprepreclist);
-
- for(var i = 0 ; i < loopcnt.length; i++){
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(loopcnt[i], "status", "l");
- ds_main_unpreprecinfo_unprepreclist.setColumn(loopcnt[i], "detldeptnm", group3.cmb_detldeptcd.text);
- ds_main_unpreprecinfo_unprepreclist.setColumn(loopcnt[i], "detldeptcd", group3.cmb_detldeptcd.value);
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비기록상태 배치미비수정
- */
- function fSetUnPrepRecInfo0(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
-
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "ud"){
- sysf_messageBox("의사변경 후에 미비상태를 변경", "I006");
- continue;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status" , "u");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "0");
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#0000ff");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비기록상태 미비확인수정
- */
- function fSetUnPrepRecInfo1(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
-
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "ud"){
- sysf_messageBox("의사변경 후에 미비상태를 변경", "I006");
- continue;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "u");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "1");
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#0000ff");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비기록상태 의사확인수정
- */
- function fSetUnPrepRecInfo2(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
-
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "ud"){
- sysf_messageBox("의사변경 후에 미비상태를 변경", "I006");
- continue;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "u");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "2");
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#0000ff");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비기록상태 재미비수정
- */
- function fSetUnPrepRecInfo3(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "ud"){
- sysf_messageBox("의사변경 후에 미비상태를 변경", "I006");
- continue;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "u");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "3");
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#0000ff");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비기록상태 완료수정
- */
- function fSetUnPrepRecInfo4(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status == "ud"){
- sysf_messageBox("의사변경 후에 미비상태를 변경", "I006");
- continue;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "u");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", "4");
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#0000ff");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비의사변경
- */
- function fChngUnPrepDrInfo(){
- var orddd = ds_main_unpreprecinfo_unprepreclist.getColumn(ds_main_unpreprecinfo_unprepreclist.rowposition, "formrecdd");
- frmf_setParameter("SPMRI02900_stnddd", orddd);
- frmf_modal("SPMRI02900", "SPMRI02900", "", null, "", "", "", null, null, null, null, null, "M");
-
- if(frmf_getParameter("SPMRI02900_useyn")=="Y"){
- var doctinfo = frmf_getParameter("SPMRI02900_rtnparam");
- doctinfo = utlf_transNullToEmpty(doctinfo).split("^");
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status != "i"){ //신규가 아닌 경우, 의사변경으로 상태변경
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "ud");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "orddeptcd" , doctinfo[0]);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepdeptnm", doctinfo[1]);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "doctkindflag", doctinfo[2]);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepdrid" , doctinfo[3]);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepdrnm" , doctinfo[4]);
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#808080");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- frmf_setParameter("SPMRI02900_useyn" , "");
- frmf_setParameter("SPMRI02900_rtnparam", "");
- }
- /**
- * @desc 미비의사 직종(Intern)으로 변경
- */
- function fChngUnPrepInternPos(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status != "i"){
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "up");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "doctkindflag", "I");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비의사 직종(Resident)로 변경
- */
- function fChngUnPrepResiPos(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status != "i"){
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "up");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "doctkindflag", "R");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비의사 직종(Staff)로 변경
- */
- function fChngUnPrepStaffPos(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- if(status != "i"){
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "up");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "doctkindflag", "St");
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- }
- /**
- * @desc 미비과 변경 팝업창 open
- */
- function fOpenUnPrepDeptCD(){
-
- group1.position.left = clientX;
- group1.position.top = clientY;
- group1.position.height = 55;
- group1.position.width = 218;
- }
- /**
- * @desc 미비분과 설정창 open
- */
- function fOpenUnPrepDeltDeptCD(){
- sysf_messageBox("사용하지 않는 기능입니다","I");
- return;
-
- var currow = ds_main_unpreprecinfo_unprepreclist.rowposition;
- if(currow >= 0){
- group3.position.left = clientX;
- group3.position.top = clientY;
-
- // targetX가 간혹 음수가 나오는 케이스를 수정
- group3.position.height = 55;
- group3.position.width = 218;
-
- var orddeptcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orddeptcd");
- //미비과에 따라 미비분과 combo정보를 변경
- if(orddeptcd == "2040000000"){ //외과
- group3.cmb_detldeptcd.innerdataset = "ds_init_M0501";
- }else if(orddeptcd == "2100000000"){ //산부인과
- group3.cmb_detldeptcd.innerdataset = "ds_init_M0502";
- }else if(orddeptcd == "2110000000"){ //소아과
- group3.cmb_detldeptcd.innerdataset = "ds_init_M0503";
- }
- else
- {
- group3.cmb_detldeptcd.innerdataset = "ds_init_M0504";
- dsf_makeValue(ds_main_unprepdeptcd, "detldeptcd", "string", "");
- return;
- }
- group3.cmb_detldeptcd.index = 1;
- }
- }
- /**
- * @desc 수정취소
- */
- function fCnclSetPrepRecInfo(){
- var len = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0 ; i < len.length; i++){
- var currow = len[i];
- var status = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "status");
- var orgunprepstat = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgunprepstat");
- var orgunprepdrnm = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgunprepdrnm");
- var orgdoctkindflag = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgdoctkindflag");
- var orgunprepdrid = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgunprepdrid");
- var orgorddeptcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgorddeptcd");
- var orgdetldeptnm = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgdetldeptnm");
- var orgdetldeptcd = ds_main_unpreprecinfo_unprepreclist.getColumn(currow, "orgdetldeptcd");
-
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepstat", orgunprepstat);
- var startcol = grd_unprepreclist.getBindCellIndex("body", "dschdd");
- var endcol = grd_unprepreclist.getBindCellIndex("body", "lastupdtdt");
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "bkDelcolor", "#000000");
-
- if(status == "ud" || status == "l"){
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepdrnm" , orgunprepdrnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "doctkindflag", orgdoctkindflag);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "unprepdrid" , orgunprepdrid);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "orddeptcd" , orgorddeptcd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "detldeptnm" , orgdetldeptnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "detldeptcd" , orgdetldeptcd);
- }
- ds_main_unpreprecinfo_unprepreclist.setColumn(currow, "status", "");
- }
- }
- /**
- * @desc 기록연동 해제
- */
- function fCnclFormRecSeq(){
- var loopcnt = grdf_getSelectedRows(grd_unprepreclist);
- for(var i = 0 ; i < loopcnt.length ; i++){
- ds_main_unpreprecinfo_unprepreclist.setColumn(loopcnt[i], "status", "f");
- }
- }
- /**
- * @desc 권고상병 보기
- */
- function fGetDetlPropDiag(){
- var srow = ds_main_unpreprecinfo_unprepreclist.rowposition;
-
- var unprepitemnm = ds_main_unpreprecinfo_unprepreclist.getColumn(srow,"unprepitemnm");
- var pid = ds_main_unpreprecinfo_unprepreclist.getColumn(srow,"pid");
- var indd = ds_main_unpreprecinfo_unprepreclist.getColumn(srow,"indd");
- var cretno = ds_main_unpreprecinfo_unprepreclist.getColumn(srow,"cretno");
-
-
- if (unprepitemnm != "권고상병") {
- sysf_messageBox("권고상병 항목이 아니므로 상세화면을 열 수 없습니다","I");
- return;
- }
-
- frmf_setParameter("SPMRI02001_pid", pid);
- frmf_setParameter("SPMRI02001_indd", indd);
- frmf_setParameter("SPMRI02001_cretno", cretno);
-
- frmf_modal("SPMRI02001", "SPMRI02001", null, null, null, null, null, null, null, null, null, null, "M");
-
- }
- /**
- * @desc 미비추가된 정보 생성
- */
- function fCretUnPrepSaveInfo(){
- fSetUnPrepSaveInfo();
- }
- /**
- * @desc : 미비추가 후 저장될 정보 설정
- */
- function fSetUnPrepSaveInfo(){
- for(var i = 0 ; i < ds_temp_unpreprecinfo_unprepreclist.rowcount; i++){
- var pid = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "pid"));
- var indd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "indd"));
- var cretno = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "cretno"));
- var hngnm = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "hngnm"));
- var dschdeptcd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "dschdeptcd"));
- var dschdeptnm = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "dschdeptnm"));
- var dschdd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "dschdd"));
- var doctkindflag = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "jobposnm"));
- var unprepdrnm = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrnm"));
- var unprepdrid = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "unprepdrid"));
- var formcd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "formcd"));
- var formnm = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "formnm"));
- var unprepitemnm = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "unprepitemnm"));
- var unprepitemcd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "unprepitemcd"));
- var oprsrvno = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "oprsrvno"));
- var orddd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "orddd"));
- var indschflag = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "indschflag"));
- var orddeptcd = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "orddeptcd"));
- var formrecseq = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "formrecseq"));
- var medirecalertcnts = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "medirecalertcnts"));
- var unprepno = utlf_transNullToEmpty(ds_temp_unpreprecinfo_unprepreclist.getColumn(i, "unprepno"));
-
- if(utlf_isNull(formrecseq)){
- formrecseq = "-1";
- }
-
- ds_main_unpreprecinfo_unprepreclist.enableevent = false;
- var trgtrow = ds_main_unpreprecinfo_unprepreclist.addRow();
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "status" , "i");
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "indschflag" , indschflag);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "pid" , pid);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "indd" , indd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "cretno" , cretno);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "hngnm" , hngnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "dschdeptcd" , dschdeptcd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "dschdeptnm" , dschdeptnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "dschdd" , dschdd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepstat" , "1");
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "doctkindflag", doctkindflag);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepdrnm" , unprepdrnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepdrid" , unprepdrid);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "formrecdd" , orddd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "orddeptcd" , orddeptcd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "formcd" , formcd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "formnm" , formnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "oprsrvno" , oprsrvno);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepitemnm" , unprepitemnm);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepitemcd" , unprepitemcd);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "formrecseq" , formrecseq);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "medirecalertcnts" , medirecalertcnts);
- ds_main_unpreprecinfo_unprepreclist.setColumn(trgtrow, "unprepno" , unprepno);
- ds_main_unpreprecinfo_unprepreclist.enableevent = true;
- }
- ds_temp_unpreprecinfo_unprepreclist.clearData();
- }
- function fReqGetFormList(){
- var oParam = {};
- oParam.id = "TRMRI01804";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepFormCD";
- oParam.outds = "ds_init_cmb_formcd=unprepformcd";
- oParam.async = false;
- oParam.callback = "cf_TRMRI01804";
- tranf_submit(oParam);
-
- }
- function cf_TRMRI01804(sSvcId, nErrorCode, sErrorMsg){
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- utlf_addLog("***** cf_TRMRI01804 *****");
- frmf_addComboItem( "cmb_formcd", "전체" , "-" , "above" );
- cmb_formcd.value = "-";
- cf_TRMRI01805();
-
- }
- function fReqGetFormItemList(formcd){
- ds_send_reqdata.clearData();
- ds_send_reqdata.addColumn("formcd", "string");
- var nRow = ds_send_reqdata.addRow();
-
- ds_send_reqdata.setColumn(nRow, "formcd", formcd);
-
- var oParam = {};
- oParam.id = "TRMRI01805";
- oParam.service = "unprepmngtapp.ChrtUnprepMngt";
- oParam.method = "reqGetUnPrepItemCD";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_init_cmb_itemcd=itemcd";
- oParam.async = false;
- oParam.callback = "cf_TRMRI01805";
- tranf_submit(oParam);
- }
- function cf_TRMRI01805(sSvcId, nErrorCode, sErrorMsg){
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- utlf_addLog("***** cf_TRMRI01805*****");
-
- frmf_addComboItem("cmb_itemcd", "전체", "-" , "above");
- cmb_itemcd.value = "-";
-
- }
- function fOpenMedirecList(){
- var rowIdx = ds_main_unpreprecinfo_unprepreclist.rowposition;
- var pid = ds_main_unpreprecinfo_unprepreclist.getColumn(rowIdx, "pid");
- var formrecseq = ds_main_unpreprecinfo_unprepreclist.getColumn(rowIdx, "formrecseq");
- var srcformcd = ds_main_unpreprecinfo_unprepreclist.getColumn(rowIdx, "srcformcd");
-
- frmf_setParameter("SPMMR07000_param_pid", pid);
-
- if(formrecseq != "-1"){
- frmf_setParameter("SPMMR07000_param_formrecseq", formrecseq);
- }
-
- //frmf_setParameter("SPMMR07000_param_formrecseq", formrecseq);
- //frmf_setParameter("SPMMR07000_param_srcformcd", srcformcd);
- //frmf_setParameter("SPMMR07000_param_lastyn", "Y");
- //frmf_setParameter("SPMMR07000_param_bEnable", "");
-
- frmf_modal("SPMMR07000", "SPMMR07000", null, null, null, null, null, null, null, null, null, null, "M");
-
- frmf_clearParameter("SPMMR07000_param_pid");
- frmf_clearParameter("SPMMR07000_param_formrecseq");
- }
- /**
- * @desc 기록비교
- */
- function lf_recCompare(){
- var aRows = grdf_getSelectedRows(grd_patreclist);
- if( aRows.length != 2 ){
- sysf_messageBox("비교할 기록 2개를 정확히 선택하시기 바랍니다.", "I");
- return;
- }
-
- if(ds_main_patreclist_patreclist.getColumn(aRows[0], "formcd") != ds_main_patreclist_patreclist.getColumn(aRows[1], "formcd")){
- sysf_messageBox("동일한 서식의 기록 2개를 선택하시기 바랍니다.", "I");
- return;
- }
-
- //선택한 기록의 rechistseq, updtdd, updttm 조회
- dsf_createDs("ds_compare");
- dsf_createDs("ds_temp_rechistlist", [{col: "rechistseq", type:"string", size:256, val:""}
- , {col: "updtdd", type:"string", size:256, val:"Y"}
- , {col: "updttm", type:"string", size:256, val:""}]);
-
- for(var i = 0; i < aRows.length; i++){
- dsf_createDsRow("ds_temp_cond", [{col: "formrecseq", type:"string", size:256, val:ds_main_patreclist_patreclist.getColumn(aRows[i], "formrecseq")}
- , {col: "lastyn", type:"string", size:256, val:"Y"}]); // Y: 가장 최근 기록만 조회
-
- var oParam = {};
- oParam.id = "GetLastRecHist";
- oParam.service = "medirecapp.ComnMediRec";
- oParam.method = "reqGetRecHistList";
- oParam.inds = "req=ds_temp_cond";
- oParam.outds = "ds_compare=rechistlist";
- oParam.async = false;
-
- tranf_submit(oParam);
-
- if(ds_compare.rowcount > 0){
- var row = ds_temp_rechistlist.addRow();
- ds_temp_rechistlist.setColumn(row, "rechistseq", ds_compare.getColumn(0, "rechistseq"));
- ds_temp_rechistlist.setColumn(row, "updtdd", ds_compare.getColumn(0, "updtdd"));
- ds_temp_rechistlist.setColumn(row, "updttm", ds_compare.getColumn(0, "updttm"));
- }else{
- sysf_messageBox("아래 기록의 작성이력이 없으므로 비교 불가합니다."
- + ds_main_patreclist_patreclist.getColumn(aRows[i], "formrecdd") + " "
- + ds_main_patreclist_patreclist.getColumn(aRows[i], "formrechm").substr(0, 2) + ":"
- + ds_main_patreclist_patreclist.getColumn(aRows[i], "formrechm").substr(2, 2) + " "
- + ds_main_patreclist_patreclist.getColumn(aRows[i], "formnm")
- , "I");
- return;
- }
- }
- dsf_deleteDs("ds_compare");
-
- lf_Compare_detail("grd_medireclist", "ds_temp_rechistlist", aRows);
- }]]></Script>
|