123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 약속수술관리 ( SMMMB00700_약속수술관리.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sMECHLIST_PATH = "/root/main/mechinfo/mechlist";
- var sOPPRCPLIST_PATH = "/root/main/opprcpinfo/opprcplist";
- var sETCPRMSPRCPSETDETLLIST_PATH = "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist";
- /**
- * @desc : 약속수술관리 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize_SMMMB00700(){
- model.removeNodeset(sETCPRMSPRCPSETDETLLIST_PATH);
- model.removeNodeset(sMECHLIST_PATH);
- model.removeNodeset(sOPPRCPLIST_PATH);
-
- zbcfGetCodeList(new Array("M0029",
- "M0007"),
- new Array("/root/init/M0029",
- "/root/init/M0007"));
- model.refresh();
- }
- /**
- * @desc : 약속수술용어 등록
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRsgtPrmsOpTerm(){
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- if(setno == ""){
- messageBox("SET폴더를","C002");
- return;
- }
- modal("SPMMO03300");
-
- var useyn = getParameter("SPMMO03300_rtn_useyn");
- if(useyn == "N" || useyn == ""){
- return;
-
- }else{
- var totcnt = getNodeSetCnt("/root/temp/selectoplist");
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypcd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
-
- for(var i = 1; i <= totcnt; i++){
- grd_etcprmsprcpdetl.addRow(false);
- var currow = grd_etcprmsprcpdetl.row;
- var opcd = model.getValue("/root/temp/selectoplist[" + i + "]/opcd");
- var opengnm = model.getValue("/root/temp/selectoplist[" + i + "]/opengnm");
- var ophngnm = model.getValue("/root/temp/selectoplist[" + i + "]/ophngnm");
-
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setno" , setno);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/settypecd", settypcd);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd", opcd);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm" , opengnm);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/hngnm" , ophngnm);
- }
- }
- model.refresh();
- }
- /**
- * @desc : 수술용어 수가내역 조회
- * @
- * @param : termcd : 수술용어코드
- * @return :
- * @---------------------------------------------------
- */
- function fReqOpTermMechHistList(termcd){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/termcd", termcd);
- if(submit("TRMMB00605")){
- }
- }
- /**
- * @desc : 약속수술용어 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqGetPrmsSet(){
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/setno" , setno);
- model.makeValue("/root/send/reqdata/settypecd", settypecd);
-
- if(submit("TRMMB00602")){
- model.removeNodeset("/root/main/mechinfo/mechlist");
- model.removeNodeset("/root/main/opprcpinfo/opprcplist");
- }
- model.refresh();
- }
- /**
- * @desc : 수술용어 처방 조회
- * @
- * @param : setcdno - SET코드번호
- * : termcd - 용어코드
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqGetOpTermPrcp(setcdno, termcd){
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
-
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/setno" , setno);
- model.makeValue("/root/send/reqdata/settypecd", settypecd);
- model.makeValue("/root/send/reqdata/setcdno" , setcdno);
- model.makeValue("/root/send/reqdata/termcd" , termcd);
- if(submit("TRMMB00606")){
- }
- }
- /**
- * @desc : 수술코드 복사
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCopyOpCD(){
- for(var i = 0; i < grd_etcprmsprcpdetl.rows; i++){
- if(grd_etcprmsprcpdetl.isselected(i) == true){
- model.duplicate("/root/copy/etcprmsprcpsetdetlinfo", sETCPRMSPRCPSETDETLLIST_PATH +"[" + i + "]");
- }
- }
- }
- /**
- * @desc : 수술코드 붙여넣기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPasteOpCD(){
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
- var totcnt = getNodeSetCnt("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist");
- for(var i = 1; i <= totcnt ; i++){
- var detlsetcd = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + i + "]/detlsetcd");
- var engnm = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + i + "]/engnm");
- var hngnm = model.getValue("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + i + "]/hngnm");
- var trgtrow = grd_etcprmsprcpdetl.findRow(detlsetcd, 0, 4, true, true);
- if(trgtrow < 1){
- grd_etcprmsprcpdetl.addRow(false);
- currow = grd_etcprmsprcpdetl.row;
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setno" , setno);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/settypecd" , settypecd);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd" , detlsetcd);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm" , engnm);
- model.setValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/hngnm" , hngnm);
-
- }else{
- messageBox("[" + detlsetcd + "] 수술코드는 이미", "E006");
- continue;
- }
- }
- model.removeNodeset("/root/copy/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist");
- model.refresh();
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMouseRghtBtnPopup(){
- if(event.button == 3){
- if(grd_etcprmsprcpdetl.isCell(event.target) && grd_etcprmsprcpdetl.mouseRow >= grd_etcprmsprcpdetl.fixedRows){
- window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); //팝업창 셋팅
- }
- }else{
- window.setPopupMenu(false);
- }
- }
- /**
- * @desc : 약속SET 과색인 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqPrmsDeptIndxList(){
- if(submit("TRMMB00702")){
- }
- }
- /**
- * @desc : 수술용어처방 추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddOpTerm(){
- var currow = grd_etcprmsprcpdetl.row;
- if(currow > 0){
- var prmsflag = opener.model.getValue("/root/main/cond/prmsflag");
- if(prmsflag == "P"){ //개인
- var status = "i"; //신규등록
- var opcd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd");
- var opengnm = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm");
- var setno = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setno");
- var settypecd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/settypecd");
- var setcdno = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setcdno");
-
- }else{ //과, 타과
- var status = "c"; //신규등록 약속수술용어, 용어처방 동시에 등록
- var opcd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd");
- var opengnm = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm");
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
- var setcdno = "";
- }
-
- var icnt = 0;
- var totrow = grd_mechlist.rows;
- for(var i = 0; i < totrow; i++){
- if(grd_mechlist.valueMatrix(i, 0) == "true"){
- var prcpcd = model.getValue(sMECHLIST_PATH + "[" + i + "]/calcscorcd");
-
- //처방코드를 비교, 이미 등록된 경우, skip
- var cmpval = model.getValue(sOPPRCPLIST_PATH + "[prcpcd='" + prcpcd + "']/prcpcd");
- if(cmpval.length > 0){
- messageBox("[" + prcpcd + "]처방이", "E006");
- continue;
- }
-
- //SET번호, SET형태코드가 null인 경우, error
- if(setno == "" || settypecd == ""){
- messageBox("용어처방코드를 등록할 개인수술SET을", "C002");
- return;
- }
-
- var ordnm = model.getValue(sMECHLIST_PATH + "[" + i + "]/ordnm");
- grd_opprcp.addRow(false, true);
- icnt++;
-
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/status" , status);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/setno" , setno);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/setcdno" , setcdno);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/settypecd" , settypecd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/optermcd" , opcd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/opengnm" , opengnm);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/prcpcd" , prcpcd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/ordnm" , ordnm);
- //model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/nigtprcpflag", "N");
- //model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/erprcpflag" , "N");
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/payflagcd" , "0");
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/opansflagcd" , "-");
- }
- }
- model.refresh();
- }
- }
- /**
- * @desc : 수술용어처방 검색
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFindOp(){
- if(event.keyCode == 13){
- var srchflag = "";
- var srchdata = input1.currentText;
-
- if(fIsHangul(srchdata) == "H"){
- srchflag = "H";
-
- }else{
- var ch = srchdata.charAt(1);
- if(isNumber(ch) == true){
- srchflag = "C";
- }else{
- srchflag = "E";
- }
- }
-
- var prmsflag = opener.model.getValue("/root/main/cond/prmsflag");
- if(prmsflag == "P"){
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
- if(setno == "" || settypecd == ""){
- messageBox("수술용어 검색할 폴더를", "C002");
- return;
- }
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/setno" , setno);
- model.makeValue("/root/send/reqdata/settypecd", settypecd);
- model.makeValue("/root/send/reqdata/srchflag" , srchflag);
- model.makeValue("/root/send/reqdata/srchdata" , srchdata.toUpperCase());
- model.setValue("/root/main/cond/rsltsrch", srchdata);
- if(submit("TRMMB00602")){
- model.removeNodeset("/root/main/mechinfo/mechlist");
- model.removeNodeset("/root/main/opprcpinfo/opprcplist");
- }
-
- }else{
-
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/deptindxflag", 9);
- model.makeValue("/root/send/reqdata/deptindxcd" , opener.trv_deptindxcdlist.value);
- if(prmsflag == "D"){
- model.makeValue("/root/send/reqdata/deptcd" , getUserInfo("dutplcecd"));
- }else{
- model.makeValue("/root/send/reqdata/deptcd" , opener.model.getValue("/root/main/cond/deptsetcd"));
- }
- model.makeValue("/root/send/reqdata/srchflag" , srchflag);
- model.makeValue("/root/send/reqdata/srchdata" , srchdata.toUpperCase());
- fReqPrmsDeptIndxList();
-
- }
- model.refresh();
-
- /*
- var startrow = grd_etcprmsprcpdetl.row;
- if(startrow < 1){startrow = 0;}
- if(fIsHangul(rsltsrch) == true){
- var selectrow = grd_etcprmsprcpdetl.findRow(rsltsrch, startrow + 1, grd_etcprmsprcpdetl.colRef("hngnm"), false, false);
- grd_etcprmsprcpdetl.select(selectrow, 0, selectrow, grd_etcprmsprcpdetl.cols-1) = true;
- grd_etcprmsprcpdetl.row = selectrow;
- var curpos = grd_etcprmsprcpdetl.vscroll.attribute("pos");
- var newpos = parseInt(curpos) + 23;
- grd_etcprmsprcpdetl.vscroll.attribute("pos") = newpos;
- }else{
- var ch = rsltsrch.charAt(1);
- if(isNumber(ch) == true){ //코드
- var selectrow = grd_etcprmsprcpdetl.findRow(rsltsrch, startrow + 1, grd_etcprmsprcpdetl.colRef("detlsetcd"), false, false);
- grd_etcprmsprcpdetl.select(selectrow, 0, selectrow, grd_etcprmsprcpdetl.cols-1) = true;
- grd_etcprmsprcpdetl.row = selectrow;
- }else{ //영문
- var selectrow = grd_etcprmsprcpdetl.findRow(rsltsrch, startrow + 1, grd_etcprmsprcpdetl.colRef("engnm"), false, false);
- grd_etcprmsprcpdetl.select(selectrow, 0, selectrow, grd_etcprmsprcpdetl.cols-1) = true;
- grd_etcprmsprcpdetl.row = selectrow;
- }
- var curpos = grd_etcprmsprcpdetl.vscroll.attribute("pos");
- var newpos = parseInt(curpos) + 23;
- grd_etcprmsprcpdetl.vscroll.attribute("pos") = newpos;
- }*/
- }
- }
- /**
- * @desc : 수술용어처방 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function reqSaveExeOpTermPrcp(){
- var savenode = model.instances(0).selectNodes("/root/main/opprcpinfo/opprcplist");
- model.removeNodeset("/root/send/savedata");
- model.makeValue("/root/send/savedata", getNodeListCSV(savenode));
- if(submit("TXMMB00609")){
- }
- }
- function fAddOpTermDbclk(){
- var currow = grd_etcprmsprcpdetl.row;
- if(currow > 0){
- var prmsflag = opener.model.getValue("/root/main/cond/prmsflag");
- if(prmsflag == "P"){ //개인
- var status = "i"; //신규등록
- var opcd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd");
- var opengnm = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm");
- var setno = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setno");
- var settypecd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/settypecd");
- var setcdno = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/setcdno");
-
- }else{ //과, 타과
- var status = "c"; //신규등록 약속수술용어, 용어처방 동시에 등록
- var opcd = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/detlsetcd");
- var opengnm = model.getValue(sETCPRMSPRCPSETDETLLIST_PATH + "[" + currow + "]/engnm");
- var setno = model.getValue("/root/hidden/prmsprcpsetdetlset/setno");
- var settypecd = model.getValue("/root/hidden/prmsprcpsetdetlset/settypecd");
- var setcdno = "";
- }
-
- var srcrow = grd_mechlist.row;
- if(srcrow < 1){
- return;
- }
- var prcpcd = model.getValue(sMECHLIST_PATH + "[" + srcrow + "]/calcscorcd");
-
- //처방코드를 비교, 이미 등록된 경우, skip
- var cmpval = model.getValue(sOPPRCPLIST_PATH + "[prcpcd='" + prcpcd + "']/prcpcd");
- if(cmpval.length > 0){
- messageBox("[" + prcpcd + "]처방이", "E006");
- return;
- }
-
- //SET번호, SET형태코드가 null인 경우, error
- if(setno == "" || settypecd == ""){
- messageBox("용어처방코드를 등록할 개인수술SET을", "C002");
- return;
- }
-
- var ordnm = model.getValue(sMECHLIST_PATH + "[" + srcrow + "]/ordnm");
- grd_opprcp.addRow(false, true);
-
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/status" , status);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/setno" , setno);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/setcdno" , setcdno);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/settypecd" , settypecd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/optermcd" , opcd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/opengnm" , opengnm);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/prcpcd" , prcpcd);
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/ordnm" , ordnm);
- //model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/nigtprcpflag", "N");
- //model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/erprcpflag" , "N");
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/payflagcd" , "0");
- model.setValue(sOPPRCPLIST_PATH + "[" + grd_opprcp.row + "]/opansflagcd" , "-");
- model.refresh();
- }
- }
- /**
- * @desc : SET폴더 삭제시 해당 수술용어 데이터 삭제
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClrGridData(){
- model.removeNodeset(sETCPRMSPRCPSETDETLLIST_PATH);
- model.removeNodeset("/root/main/mechinfo/mechlist");
- model.removeNodeset("/root/main/opprcpinfo/opprcplist");
- model.refresh();
- }
|