123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326 |
- /**
- * @desc : 초기 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fInit(){
- //20111007
- //하드코드 테이블 체크
- fGetHardCDList("N", 5560, 0 , "/root/init/hardcditem");
- //20111007
-
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/resnable", 5992);
- gResnablecnt = getNodeSetCnt("/root/init/resnable/hardcd[hardcd = 'Y']"); //사유입력사용여부
-
- model.setValue("/root/main/term/termfromdd", getCurrentDate());
- model.setValue("/root/main/term/termtodd", getCurrentDate());
- model.removeNodeset("/root/temp/deptinfo/dept");
- model.removeNodeset("/root/temp/wardinfo/dept");
- //fGetDeptlist("root/send/reqdata", "/root/main/dept/orddept", "total", getUserInfo("dutplceinstcd"));
- zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
- copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept");
- addComboItem("cmb_rtndept", "전체", "-", "above");
- addComboItem("cmb_orddept", "전체", "-", "above");
- //fGetWardlist("root/send/reqdata", "/root/main/dept/ward", "");
- zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "W", "/root/temp/wardinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/ward", "/root/temp/wardinfo/dept");
- addComboItem("cmb_wardlist", "전체", "-", "above");
- copyNodeset("/root/hidden/dept/rtndept", "/root/main/hidden/ward", "append");
- if(checkOpener()){
- sParamMsg = opener.javascript.getParameter("SMRF02600_Param");
- if(sParamMsg != ""){
- model.setValue("/root/main/pid", getArrayData(sParamMsg,1,0));
- model.setValue("/root/main/term/termfromdd", getArrayData(sParamMsg,1,1));
- model.setValue("/root/main/term/termtodd", getArrayData(sParamMsg,1,1));
- } else {
- fGetPatInfo();
- }
- } else {
- fGetPatInfo();
- }
- fGetFormlist("root/send/reqdata", "/root/main/forminfo", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd"));
- //fGetFormlist("root/send/reqdata", "/root/gridData/row", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd"));
- fSetIOFlag();
- //grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("statcd");
- grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("formnm");
-
- model.setValue("/root/main/rtncnfm", "-");
- chk_state2.disabled = true;
- chk_state3.disabled = true;
- chk_state4.disabled = true;
- chk_state5.disabled = true;
- model.setValue("/root/main/scanyn", "");
- model.setValue("/root/main/dept/ward", "-");
- // 2010.03.10. 이은영
- // OCR 반납화면 스켄자료 출력 가능 부서 - 하드코드(9932)
- model.makeValue("/root/send/ocrprnthrdcd", "9932");
- model.makeNode("/root/init/ocrprnthrdcd");
- mmbfGetHardCodeInfo("/root/send/ocrprnthrdcd", "/root/init/ocrprnthrdcd", 9932);
- var dutplcecd = getUserInfo("dutplcecd");
- model.makeValue("/root/hidden/dutplcecd", dutplcecd);
- var OcrPrntCnt = getNodesetCnt(model, "/root/init/ocrprnthrdcd/hardcd[hardcd = '" + dutplcecd + "']");
- if (OcrPrntCnt > 0) {
- btn_ocrrecview.disabled = false;
- }
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/dutplcecd", 5501);
- //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
- if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
- // KNUH_20101207_박성호_end
- // 2008-07-15 정영석 요청
- // 간호에서 바코드 반납 및 이력보기를 띄울 수 있도록 요청함
- //btn_barcode.disabled = false;
- //btn_histview.disabled = false;
- btn_rtn.disabled = false;
- btn_rntcancel.disabled = false;
- btn_rtncnfm.disabled = false;
- btn_cnfmcancel.disabled = false;
- btn_prntcancel.disabled = false;
- btn_delcancel.disabled = false;
- btn_excel.disabled = false;
- btn_ocrrecview.disabled = false;
- }
-
- //2010-03-18 오전 10:27:07 이환석
- //병동간호, 응급간호 등 입원간호 메뉴그룹의 동의서 및 기타출력 서식 반납 화면에서
- //구분 초기설정을 메뉴 paramter값에 따라 달리 한다.(parameter값 없을 경우 default)
- var menuparam = getScreenMenuParameter();
-
- //바로가기로 OCR반납 화면을 들어갔을 경우 null이 문자로 들어감.
- if(menuparam == "null") {
- model.setValue("/root/main/flag", "ORD");
- } else if(menuparam != "") {
- model.setValue("/root/main/flag", menuparam);
- }
-
- //2013/02/21 Start
- model.setValue("/root/main/eocryn", "-");
- model.setValue("/root/main/scanyn", "-");
- //2013/02/21 End
- model.refresh();
- }
- /**
- * @desc : 동의서 및 기타 출력서식 반납 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSearch(){
- //20111010
- model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/term/termfromdd"));
- model.makeValue("/root/send/reqdata/termtodd", model.getValue("/root/main/term/termtodd"));
- submit("TRMRF02699");
- if(model.getValue("/root/cond/check")> 31){
- if(model.getValue("/root/main/pid")=="" && model.getValue("/root/inputSearchData")==""){
- alert("조회기간이 31일 이상이면 등록번호 또는 서식명 선택이 필수입니다!");
- return;
- }
- }
- //20111010
- fSetDeptValue(); //2010.02.18, hkjoo
-
- var sendPath = "/root/send/reqdata/ocrprnt";
- var statcd = model.getValue("/root/main/rtncnfm");
- statcd = statcd.split(" ").join("|");
-
- model.makeValue(sendPath + "/dateflag", model.getValue("/root/main/flag"));
- model.makeValue(sendPath + "/termfromdd", model.getValue("/root/main/term/termfromdd"));
- model.makeValue(sendPath + "/termtodd", model.getValue("/root/main/term/termtodd"));
- model.makeValue(sendPath + "/prntdeptcd", model.getValue("/root/main/dept/prntdept"));
- model.makeValue(sendPath + "/rtndeptcd", model.getValue("/root/main/dept/rtndept"));
- model.makeValue(sendPath + "/orddeptcd", model.getValue("/root/main/dept/orddept"));
- model.makeValue(sendPath + "/wardcd", model.getValue("/root/main/dept/ward"));
- model.makeValue(sendPath + "/ioflag", model.getValue("/root/main/ioflag"));
- model.makeValue(sendPath + "/rtncnfm", statcd);
- model.makeValue(sendPath + "/scanyn", model.getValue("/root/main/scanyn"));
- model.makeValue(sendPath + "/eocryn", model.getValue("/root/main/eocryn"));
- model.makeValue(sendPath + "/exdsc", model.getValue("/root/main/exdsc"));
- model.makeValue(sendPath + "/lstupdtdeptnm", model.getValue("/root/main/lstupdtdeptnm"));
- model.makeValue(sendPath + "/lstupdtusernm", model.getValue("/root/main/lstupdtusernm"));
- model.makeValue(sendPath + "/verflag", "A");
- model.makeValue(sendPath + "/inputflag", "A");
-
-
- if(model.getValue("/root/inputSearchData")==""){
- model.makeValue(sendPath + "/formcd", "");
- model.makeValue(sendPath + "/formfromdt", "");
-
- }else{
- model.makeValue(sendPath + "/formcd", model.getValue("/root/inputSelectValue"));
- model.makeValue(sendPath + "/formfromdt", model.getValue("/root/inputSelectValue2"));
- }
- //2012/05/22 End
- model.makeValue(sendPath + "/pid", model.getValue("/root/main/pid"));
-
- submit("TRMRF02604");
- //grd_ocrprntlist.clearStatus();
- grd_ocrprntlist.rebuildStyle();
- //grd_ocrprntlist.cellStyle("background-image", grd_ocrprntlist.row, 1) = "../../../com/commonweb/images/icon_n.gif";
- model.removeNodeset("/root/send/reqdata");
- model.refresh();
- }
- /**
- * @desc : 부서리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetDeptlist(ref, rsltRef, queryflag, dutplceinstcd){
- if(queryflag != null)
- model.makeValue(ref + "/queryflag", queryflag);
-
- if(dutplceinstcd != null)
- model.makeValue(ref + "/dutplceinstcd", dutplceinstcd);
-
- submit("TRMRF02601", true, ref, rsltRef);
- }
- /**
- * @desc : 병동리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetWardlist(ref, rsltRef, queryflag){
- if(queryflag != null)
- model.makeValue(ref + "/queryflag", queryflag);
-
- submit("TRMRF02602", true, ref, rsltRef);
- }
- /**
- * @desc : 폼리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetFormlist(ref, rsltRef, queryflag, dutplceinstcd){
- if(queryflag != null)
- model.makeValue(ref + "/queryflag", queryflag);
-
- if(dutplceinstcd != null)
- model.makeValue(ref + "/dutplceinstcd", dutplceinstcd);
-
- submit("TRMRF02603", true, ref, rsltRef);
- }
- /**
- * @desc : 출력부서리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetPrntDeptlist(ioflag){
- model.removeNodeset("/root/temp/deptinfo/dept");
- switch(ioflag){
- case "A":
- zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
- copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept");
- copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/ward", "append");
- addComboItem("cmb_rtndept", "전체", "-", "above");
- addComboItem("cmb_orddept", "전체", "-", "above");
- copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/rtndept");
- break;
- case "O":
- zsdfGetOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
- copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
- addComboItem("cmb_orddept", "전체", "-", "above");
- addComboItem("cmb_prntdept", "전체", "-", "above");
- model.removeNodeset("/root/temp/deptinfo/dept");
- zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/rtndept", "/root/temp/deptinfo/dept");
- addComboItem("cmb_rtndept", "전체", "-", "above");
- break;
- case "I":
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
- copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
- copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append");
- addComboItem("cmb_orddept", "전체", "-", "above");
- addComboItem("cmb_prntdept", "전체", "-", "above");
- copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace");
- break;
- case "E":
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc");
- copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept");
- copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace");
- copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append");
- addComboItem("cmb_orddept", "전체", "-", "above");
- addComboItem("cmb_prntdept", "전체", "-", "above");
- copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace");
- break;
- }
- }
- /**
- * @desc : 입원/외래 구분정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetIOFlag(){
- if((rdo_ioflag.value == "I") || (rdo_ioflag.value == "E") || (rdo_ioflag.value == "A")){
- cmb_wardlist.disabled = false;
- if(rdo_ioflag.value == "I"){
- fGetPrntDeptlist("I");
- }else if(rdo_ioflag.value == "E"){
- fGetPrntDeptlist("E");
- }else if(rdo_ioflag.value == "A"){
- fGetPrntDeptlist("A");
- }
- } else {
- cmb_wardlist.disabled = true;
- if(rdo_ioflag.value == "O"){
- fGetPrntDeptlist("O");
- }
- }
- model.refresh();
- }
- /**
- * @desc : 반납부서리스트 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetRtnDeptlist(){
- zbcfGetCodeList( new Array("A0146"), new Array("/root/init/baseinfo/tmplcdflag"), false );
- submit("TRZBC00101");
- }
- /**
- * @desc : 정보저장
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetData(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
-
- model.removeNodeset("/root/send/reqdata");
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(targetPath + "[" + irow + "]/choice") == "true"){
- //copyNodeset("/root/send/reqdata", listPath+"["+irow+"]", "append");
- copyNodeset("/root/send/reqdata", targetPath+"["+irow+"]", "append");
- }
- }
- if(submit("TXMRF02605")){
- messageBox("", "I001");
- } else {
- messageBox("", "E009");
- }
- model.removeNodeset("/root/send/reqdata");
- model.removeNodeset("/root/maintemp/prntstat/list");
- }
- /**
- * @desc : 사용자부서 및 반납세팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetRtn(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
-
- var currDT = getCurrentDate()+getCurrentTime();
-
- model.resetInstanceNode("/root/main/userpopupinfo");
- model.setValue("/root/main/userpopupinfo/param", "_OneS_DD");
- model.makeValue("/root/main/userpopupinfo/searchitem", getUserInfo("userid"));
- model.makeValue("/root/main/userpopupinfo/flag", "userid");
- modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
- var selusr = getParameter("SPZSU10103_");
- setCSVToNode("/root/temp/userinfo", selusr);
- clearParameter("SPZSU10103_사용자부서선택조회");
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
-
- //20111007
- var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
- for(var i=1; i<=parseInt(chkform.length); i++){
- if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
- alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 반납은 선택진료 신청관리 화면에서만 가능합니다.");
- return;
- }
- }
- //20111007
- if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
- messageBox("출력상태가 아닌 데이터가","E005");
- return;
- }
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/rtndt", currDT);
- model.setValue( targetPath+"["+cnt+"]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid"));
- model.setValue( targetPath+"["+cnt+"]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm"));
- model.setValue( targetPath+"["+cnt+"]/statcd", "R");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm"));
-
- /*
- model.setValue(listPath + "[" + irow + "]/rtndt", currDT);
- model.setValue(listPath + "[" + irow + "]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid"));
- model.setValue(listPath + "[" + irow + "]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm"));
- model.setValue(listPath + "[" + irow + "]/statcd", "R");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm"));*/
-
- if(model.getValue(listPath + "[" + irow + "]/formcd") == "0000001778"){
- fGetNewBabyInfo(listPath, irow);
- }
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 반납확인정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetRtnCnfm(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
- var currDT = getCurrentDate()+getCurrentTime();
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
- if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){
- messageBox("반납상태가 아닌 데이터가","E005");
- return;
- }
-
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", getUserInfo("usernm"));
- model.setValue( targetPath+"["+cnt+"]/statcd", "C");
- model.setValue( targetPath+"["+cnt+"]/rtncnfm", "Y");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
- /*
- model.setValue(listPath + "[" + irow + "]/rtncnfmdt", currDT);
- model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", getUserInfo("usernm"));
- model.setValue(listPath + "[" + irow + "]/statcd", "C");
- model.setValue(listPath + "[" + irow + "]/rtncnfm", "Y");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 반납취소 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetRtnCancel(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
- var currDT = getCurrentDate()+getCurrentTime();
- var updtresncnts = model.getValue("/root/tmp/resn");
- //의무기록 부서
- var cnt = getNodeSetCnt("/root/temp/dutplcecd/hardcd[hardcd = '" + getUserInfo("dutplcecd") + "']");
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
- //20111007
- var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
- for(var i=1; i<=parseInt(chkform.length); i++){
- if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
- alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 반납취소는 선택진료 신청관리 화면에서만 가능합니다.");
- return;
- }
- }
- //20111007
- if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){
- messageBox("스캔된 Data는 반납취소를","E001");
- return;
- }
- if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){
- messageBox("반납상태가 아닌 데이터가","E005");
- return;
- }
-
- if(cnt == 0 && model.getValue(listPath + "[" + irow + "]/prntuserid") != getUserInfo("userid")){
- messageBox("출력자와 반납취소자가 동일하지 않아 진행 불가합니다","E");
- return;
- }
-
-
-
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/rtndt", "");
- model.setValue( targetPath+"["+cnt+"]/rtndeptcd", "");
- model.setValue( targetPath+"["+cnt+"]/rtnuserid", "");
- model.setValue( targetPath+"["+cnt+"]/rtndeptnm", "");
- model.setValue( targetPath+"["+cnt+"]/rtnusernm", "");
- model.setValue( targetPath+"["+cnt+"]/statcd", "CR");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
- model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
-
- /*
- model.setValue(listPath + "[" + irow + "]/rtndt", "");
- model.setValue(listPath + "[" + irow + "]/rtndeptcd", "");
- model.setValue(listPath + "[" + irow + "]/rtnuserid", "");
- model.setValue(listPath + "[" + irow + "]/rtndeptnm", "");
- model.setValue(listPath + "[" + irow + "]/rtnusernm", "");
- model.setValue(listPath + "[" + irow + "]/statcd", "CR");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 반납확인정보 취소 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetRtnCnfmCancel(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
- var currDT = getCurrentDate()+getCurrentTime();
- var updtresncnts = model.getValue("/root/tmp/resn");
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
- if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){
- messageBox("스캔된 Data는 반납확인 취소를","E001");
- return;
- }
- if(!(model.getValue(listPath + "[" + irow + "]/statcd") == "C")){
- messageBox("반납상태가 아닌 데이터가","E005");
- return;
- }
-
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", "");
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", "");
- model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", "");
- model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", "");
- model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", "");
- model.setValue( targetPath+"["+cnt+"]/statcd", "CC");
- model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
- model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
-
-
- /*
- model.setValue(listPath + "[" + irow + "]/rtncnfmdt", "");
- model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", "");
- model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", "");
- model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", "");
- model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", "");
- model.setValue(listPath + "[" + irow + "]/statcd", "CC");
- model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 출력 취소 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetPrntCancel(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
- var currDT = getCurrentDate()+getCurrentTime();
- var updtresncnts = model.getValue("/root/tmp/resn");
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
- //20111007
- var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
- for(var i=1; i<=parseInt(chkform.length); i++){
- if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
- alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 삭제는 선택진료 신청관리 화면에서만 가능합니다.");
- return;
- }
- }
- //20111007
-
- //2013/03/08 Start
- if(model.getValue(listPath + "[" + irow + "]/statcd") == "CP" || model.getValue(listPath + "[" + irow + "]/statcd") == "D"){
- messageBox("이미 삭제된 데이터입니다", "I", "");
- return;
- }
- //2013/03/08 End
-
- //2013/02/22 Start 전자동의서 관련 수정 시작
- if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){
-
- }else if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
- messageBox("출력상태가 아닌 데이터가","E005");
- return;
- }
- /*if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR")
- || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){
- messageBox("출력상태가 아닌 데이터가","E005");
- return;
- }*/
- //2013/02/22 End
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/prntdt", "");
- model.setValue( targetPath+"["+cnt+"]/prntdeptcd", "");
- model.setValue( targetPath+"["+cnt+"]/prntuserid", "");
- model.setValue( targetPath+"["+cnt+"]/prntdeptnm", "");
- model.setValue( targetPath+"["+cnt+"]/prntusernm", "");
- model.setValue( targetPath+"["+cnt+"]/statcd", "CP");
- model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
- model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts);
-
-
- //2013/02/27 Start 전자동의서 관련 플래그 체크
- if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){
- model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y");
- }
- //2013/02/27 End
-
- /*
- model.setValue(listPath + "[" + irow + "]/prntdt", "");
- model.setValue(listPath + "[" + irow + "]/prntdeptcd", "");
- model.setValue(listPath + "[" + irow + "]/prntuserid", "");
- model.setValue(listPath + "[" + irow + "]/prntdeptnm", "");
- model.setValue(listPath + "[" + irow + "]/prntusernm", "");
- model.setValue(listPath + "[" + irow + "]/statcd", "CP");
- model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 출력 취소 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetDelCancel(){
- var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows;
- var listPath = "/root/main/prntstat/list";
- var targetPath="/root/maintemp/prntstat/list";
- var currDT = getCurrentDate()+getCurrentTime();
-
- for(var irow = 1; irow <= rowcount; irow++){
- if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){
- if(model.getValue(listPath + "[" + irow + "]/statcd") != "CP" && model.getValue(listPath + "[" + irow + "]/statcd") != "D"){
- messageBox("삭제상태가 아닌 데이터가","E005");
- return;
- }
-
- //2013/02/27 Start 원무에서 발생하는 서식은 원무쪽 화면으로 유도
- var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd");
- for(var i=1; i<=parseInt(chkform.length); i++){
- if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){
- alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "의 삭제 취소는 선택진료 신청관리 화면에서만 가능합니다.");
- return;
- }
- }
- //2013/02/27 End
-
- var cnt = model.getXPathValue("count("+targetPath+")");
- cnt = parseInt(cnt) + 1;
- model.makeNode(targetPath+"["+cnt+"]");
-
- model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]");
-
- model.setValue( targetPath+"["+cnt+"]/prntdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/prntdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/prntuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/prntdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/prntusernm", getUserInfo("usernm"));
-
- //2013/02/25 Start 전자동의서를 삭제취소 할시에는 반납 상태로 돌림
- if(model.getValue(listPath + "[" + irow + "]/eocryn") != "Y"){
- model.setValue( targetPath+"["+cnt+"]/statcd", "P");
- }else{
- model.setValue( targetPath+"["+cnt+"]/statcd", "C");
- model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y");
- }
- //2013/02/25 End
-
-
-
- model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N");
- model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT);
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm"));
-
- /*
- model.setValue(listPath + "[" + irow + "]/prntdt", currDT);
- model.setValue(listPath + "[" + irow + "]/prntdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/prntuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/prntdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/prntusernm", getUserInfo("usernm"));
- model.setValue(listPath + "[" + irow + "]/statcd", "P");
- model.setValue(listPath + "[" + irow + "]/rtncnfm", "N");
- model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT);
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd"));
- model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid"));
- model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm"));
- model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */
- }
- }
- model.refresh();
- fSetData();
- }
- /**
- * @desc : 버튼 초기화
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function finitialBtn(row, checkflag){
- var statcd = model.getValue("/root/main/prntstat/list["+row+"]/statcd");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
- var dutplcecd = getUserInfo("dutplcecd");
- if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
- // KNUH_20101207_박성호_end
- if(checkflag){
- switch(statcd){
- case "P":
- btn_rtncnfm.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtn.disabled = false;
- btn_prntcancel.disabled = false;
- break;
- case "R":
- btn_rtncnfm.disabled = false;
- btn_rntcancel.disabled = false;
- btn_cnfmcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtn.disabled = true;
- btn_prntcancel.disabled = true;
- break;
- case "C":
- btn_rtncnfm.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = false;
- btn_delcancel.disabled = true;
- btn_rtn.disabled = true;
- btn_prntcancel.disabled = true;
- break;
- case "CP":
- btn_rtncnfm.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = true;
- btn_delcancel.disabled = false;
- btn_rtn.disabled = true;
- btn_prntcancel.disabled = true;
- break;
- case "CR":
- btn_rtncnfm.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtn.disabled = false;
- btn_prntcancel.disabled = false;
- break;
- case "CC":
- btn_rtncnfm.disabled = false;
- btn_rntcancel.disabled = false;
- btn_cnfmcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtn.disabled = true;
- btn_prntcancel.disabled = true;
- break;
- }
- }
-
- var setflag = model.getValue("/root/main/prntstat/list["+row+"]/scanyn");
-
- if((setflag == "Y")&&((statcd == "R")||(statcd == "CC"))){
- btn_barcode.disabled = true;
- btn_rtn.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = true;
- btn_prntcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtncnfm.disabled = false;
- } else if((setflag == "Y")&&(statcd == "C")){
- btn_barcode.disabled = true;
- btn_rtn.disabled = true;
- btn_rntcancel.disabled = true;
- btn_cnfmcancel.disabled = true;
- btn_prntcancel.disabled = true;
- btn_delcancel.disabled = true;
- btn_rtncnfm.disabled = true;
- }
- }
-
- //2013/02/22 Start 전자동의서관련 수정
- /*
- * 전자동의서를 선택시 삭제 또는 삭제취소를 활성화 시켜준다.
- */
- var eocryn = model.getValue("/root/main/prntstat/list["+row+"]/eocryn");
- if(eocryn=="Y"){
- btn_prntcancel.disabled = false;
- btn_delcancel.disabled = false;
- }
- //2013/02/22 End
-
- //사유입력가능기관
- if (gResnablecnt > 0) {
- btn_rntcancel.disabled = false;
- }
-
- }
- /**
- * @desc : 엑셀파일로 저장
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != "")
- {
- grd_ocrprntlist.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
- /**
- * @desc : 기록이력정보 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fShowHist(){
- var row = grd_ocrprntlist.row;
- var chk_List = instance1.selectNodes("/root/main/prntstat/list[choice = 'true']");
- if(chk_List.length > 1){
- messageBox("데이타가 두 건이상", "E005");
- return;
- }
- if(btn_histview.label == "이력닫기"){
- group2.attribute("visibility") = "hidden";
- grd_ocrprntlist.rebuildStyle();
- btn_histview.attribute("text") = "이력보기"
- btn_histview.refresh();
- return;
- }
- model.makeValue("/root/send/reqdata/ocrtag", model.getValue("/root/main/prntstat/list["+row+"]/ocrtag"));
- model.makeValue("/root/send/reqdata/currentdd", getCurrentDate());
- submit("TRMRF02606");
- group2.attribute("visibility") = "visible";
- btn_histview.attribute("text") = "이력닫기"
- btn_histview.refresh();
- model.removeNodeset("/root/send/reqdata");
- }
- /**
- * @desc : 환자정보 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetPatSearch(){
- model.makeValue("/root/temp/srchcond","1");
- model.makeValue("/root/temp/pid", model.getValue("/root/main/pid"));
- model.makeValue("/root/temp/autoflag", "Y"); // 1건인경우 자동으로닫힘
- modal("SPPMC02500", 1, 10, 10, "SPPMC02500", "/root/temp", "/root/send");
- model.setValue("/root/main/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.refresh();
- }
- /**
- * @desc : 데이타 선택
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fChoiceData(){
- var row = grd_ocrprntlist.row;
- var sRowCnt = grd_ocrprntlist.rows- grd_ocrprntlist.fixedRows;
- var allSel = grd_ocrprntlist.valueMatrix(0, 1);
-
- if(grd_ocrprntlist.isCell(event.target) && grd_ocrprntlist.mouserow >= grd_ocrprntlist.fixedrows) { //그리드에서 데이타영역만 선택
- if(grd_ocrprntlist.col == 1){
- if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "true"){
- model.makeValue("/root/main/prntstat/list["+row+"]/choice", "true");
- finitialBtn(row, model.getValue("/root/main/prntstat/list["+row+"]/choice"));
- }else if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "false"){
- model.makeValue("/root/main/prntstat/list["+row+"]/choice", "false");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- var dutplcecd = getUserInfo("dutplcecd");
- //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){
- if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){
- // KNUH_20101207_박성호_end
- btn_rtncnfm.disabled = false;
- btn_rntcancel.disabled = false;
- btn_cnfmcancel.disabled = false;
- btn_delcancel.disabled = false;
- btn_rtn.disabled = false;
- btn_prntcancel.disabled = false;
- btn_barcode.disabled = false;
- }
- }
- }
- }else if((grd_ocrprntlist.col == 1) && (grd_ocrprntlist.row == 0)) {
- if(allSel == "선택"){
- for(var iRow=1; iRow<=sRowCnt; iRow++){
- model.setValue("/root/main/prntstat/list["+iRow+"]/choice","true");
- grd_ocrprntlist.valueMatrix(0, 1) = "해제";
- }
- } else if(allSel == "해제"){
- for(var iRow=1; iRow<=sRowCnt; iRow++){
- model.setValue("/root/main/prntstat/list["+iRow+"]/choice","false");
- grd_ocrprntlist.valueMatrix(0, 1) = "선택";
- }
- }
- }
- }
- /**
- * @desc : 환자 정보 Get
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetPatInfo(){
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/session/paminfo", node);
-
- model.setValue("/root/main/flag", "ORD");
- model.setValue("/root/main/pid", model.getValue("/root/main/session/paminfo/list/pid"));
- model.setValue("/root/main/dept/orddept", model.getValue("/root/main/session/paminfo/list/orddeptcd"));
- model.setValue("/root/main/ioflag", model.getValue("/root/main/session/paminfo/list/ordtype"));
- //model.setValue("/root/main/dept/prntdept", model.getValue("/root/main/session/paminfo/list/orddeptcd"));
- if((model.getValue("/root/main/ioflag") == "O") || (model.getValue("/root/main/ioflag") == "S")){
- model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/orddd"));
- model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/orddd"));
- } else if(model.getValue("/root/main/ioflag") == "I"){
- model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.setValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
- } else if(model.getValue("/root/main/ioflag") == "E"){
- model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
- } else if(model.getValue("/root/main/ioflag") == "D"){
- model.setValue("/root/main/ioflag", "I");
- model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd"));
- model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd"));
- } else {
- model.setValue("/root/main/ioflag", "A");
- }
- fSearch();
- }
- /**
- * @desc : 바코드 반납 팝업
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fBarCodeRtnPopup()
- {
- modal("SPMRF02900", "", "200", "200", "SPMRF02900","","");
- }
- /**
- * @desc : OCR 재프린트
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fRePrntOCR(){
- var formtypecls = "";
- var ocrtagprntyn = "";
- var iRow = grd_ocrprntlist.row;
- ivw_ocrprnt.attribute("src") = "../../../emr/formmngtweb/xrw/SSMRF03800_OCR뷰어.xrw";
- var formcd = model.getValue("/root/main/prntstat/list["+ iRow + "]/formcd");
- var pid = model.getValue("/root/main/prntstat/list["+ iRow + "]/pid");
- var orddd = model.getValue("/root/main/prntstat/list["+ iRow + "]/orddd");
- var cretno = model.getValue("/root/main/prntstat/list["+ iRow + "]/cretno");
- var ordtype = model.getValue("/root/main/prntstat/list["+ iRow + "]/ioflag");
- var ocrtag = model.getValue("/root/main/prntstat/list["+ iRow + "]/ocrtag");
- var scanyn = model.getValue("/root/main/prntstat/list["+ iRow + "]/scanyn");
-
- // 변경 요청번호 1851에 따른 수정
- // 2009-07-24 nj
- if(scanyn == 'Y'){
- messageBox("스캔완료된 서식은 재출력 할 수", "I004");
- return;
- }
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/ocrtag", ocrtag);
-
- /* var returnVal = fGetHardCDList("Y", 199, 3);dnpq
- //유전자검사 동의서 재출력(2011.12.08 lyj)
- if ( formcd == returnVal ) */
-
- if( fContainsHardCD("199", formcd))
- {
- ivw_ocrprnt.window.javascript.fGenePrint(ocrtag,ordtype,formcd);
- return;
- }
-
- if(submit("TRMRF02605")){
- formtypecls = model.getValue("/root/main/ocrforminfo/formtypecls");
- ocrtagprntyn = model.getValue("/root/main/ocrforminfo/ocrtagprntyn");
-
-
- ivw_ocrprnt.window.javascript.fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag);
- ivw_ocrprnt.window.javascript.fPrint("A");
- }
- }
- /**
- * @desc : OCR 프린트
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fOcrprnt(){
- if(isDataCell()){
- var state = grd_ocrprntlist.valueMatrix(grd_ocrprntlist.mouserow, grd_ocrprntlist.colRef("statcd"));
-
- //상태가 삭제인 경우만 제외하고 재출력이 가능하도록 수정
- if ( state != "CP" && state != "D" )
- setPopupMenu("grd_ocrprntlist", false, "/root/init/mouserght", "label", "value");
- } else {
- initPopupMenu();
- }
- }
- /**
- * @desc : 신생아지문표 반납은 신생아 정보로 정보 수정이 되어야 함
- *
- * @param : ocrtag
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetNewBabyInfo(listPath, irow){
- var targetPath="/root/maintemp/prntstat/list";
-
- var pid = model.getValue(listPath + "[" + irow + "]/pid");
- var cretno = model.getValue(listPath + "[" + irow + "]/cretno");
- var orddd = model.getValue(listPath + "[" + irow + "]/orddd");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/send/reqdata/indd", orddd);
- if(submit("TRMRF02501")){
- var nodeCnt = getNodesetCount("/root/main/newbabylist/newbabyinfo");
- if(nodeCnt == 0){
- messageBox("등록된 신생아가 존재하지 않습니다", "");
- return;
- } else if(nodeCnt > 1){
- setParameter("SPMRF02500_pid", pid);
- setParameter("SPMRF02500_indd", orddd);
- setParameter("SPMRF02500_cretno", cretno);
- setParameter("SPMRF02500_rtnPath", "/root/hidden/param/newbabyinfo");
- modal("SPMRF02500");
-
- /*
- model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno"));
- model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm"));
- model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd"));
- model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno"));
- model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd"));
- model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid"));
- model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm"));
- model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm"));*/
-
- model.setValue( targetPath + "/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno"));
- model.setValue( targetPath + "/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm"));
- model.setValue( targetPath + "/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd"));
- model.setValue( targetPath + "/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno"));
- model.setValue( targetPath + "/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd"));
- model.setValue( targetPath + "/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid"));
- model.setValue( targetPath + "/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm"));
- model.setValue( targetPath + "/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm"));
-
- model.resetInstanceNode("/root/hidden/param/newbabyinfo");
- } else {
- /*
- model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno"));
- model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm"));
- model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd"));
- model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno"));
- model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd"));
- model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid"));
- model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm"));
- model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,")); */
-
- model.setValue( targetPath + "/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno"));
- model.setValue( targetPath + "/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm"));
- model.setValue( targetPath + "/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd"));
- model.setValue( targetPath + "/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno"));
- model.setValue( targetPath + "/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd"));
- model.setValue( targetPath + "/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid"));
- model.setValue( targetPath + "/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm"));
- model.setValue( targetPath + "/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,"));
-
- model.resetInstanceNode("/root/main/newbabylist/newbabyinfo");
- }
- }
- }
- /**
- * @desc : 퇴원환자에 대한 OCR서식을 조회하기 위한 값 설정
- *
- * @param :
- * @return :
- * @author : 나종천
- * @---------------------------------------------------
- */
- function fDschSrchSetting(){
- chk_state2.disabled = false;
- chk_state3.disabled = false;
- chk_state4.disabled = false;
- chk_state5.disabled = false;
- model.setValue("/root/main/flag", "DSCH");
- model.setValue("/root/main/ioflag", "I");
- model.setValue("/root/main/term/termfromdd", getCurrentDate());
- model.setValue("/root/main/term/termtodd", getCurrentDate());
- model.setValue("/root/main/rtncnfm", "P|CD|CR");
- model.refresh();
- }
- /**
- * @desc : 출남부서 조회
- *
- * @param :
- * @return :
- * @author : 주희경
- * @---------------------------------------------------
- */
- function fGetDeptSearch( targetDept ){
- var supdeptcolumn = ""; // "homecaresupdeptcd";
- var searchcondition = "deptnm";
- var searchterm = model.getValue("/root/temp/dept/"+targetDept+"/depthngnm");
- var receivedeptcdpath = "/root/main/dept/"+targetDept;
- var receivedeptnmpath = "/root/temp/dept/"+targetDept+"/depthngnm";
- var instcd = getUserInfo("dutplceinstcd");
- zbcfGetDeptCodeListFromTree(searchcondition, searchterm, instcd, supdeptcolumn, receivedeptcdpath, receivedeptnmpath);
- }
- /**
- * @desc : 조회 텍스트가 없을 때 출남부서 value 초기화
- *
- * @param :
- * @return :
- * @author : 주희경
- * @---------------------------------------------------
- */
- function fSetDeptValue()
- {
- var prntdept = model.getValue("/root/temp/dept/prntdept/depthngnm");
- var rtndept = model.getValue("/root/temp/dept/rtndept/depthngnm");
- if (prntdept == "")
- {
- model.setValue("/root/main/dept/prntdept", "");
- }
- if (rtndept == "")
- {
- model.setValue("/root/main/dept/rtndept", "");
- }
- }
- /* 테스트 OCR 출력용 인터페이스-이윤주 */
- function fPerPrntOCR()
- {
-
- var formcd = "1100011224";
- var pid = "93888";
- var orddd = "20120227";
- var cretno = "1";
- var ordtype = "O";
-
- setParameter ("formcd", formcd );
- setParameter ("pid", pid);
- setParameter ("orddd", orddd );
- setParameter ("cretno", cretno);
- setParameter ("ordtype", ordtype );
-
- modal ("SSMRF03700");
-
-
- }
|