123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- /*function list
- /*
- 작성자:이윤주
- 목적:임상 질 지표 화면 개발
- */
- function fIni() {
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/hardcd", 5700);
-
- zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"),"orduseyn","W","/root/init/wardcdlsit","depthngnm","asc");
- zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"),"orduseyn","D","/root/init/orddeptlist","depthngnm","asc");
-
- addComboItem("cmb_deptcd", "전체", "ALL");
- addComboItem("cmb_wardcd", "전체", "ALL");
-
- submit("TRMQI03006");
-
- model.setValue("/root/main/cond/searchkind","CI01");
- model.setValue("/root/main/cond/ddflag","D");
- model.setValue("/root/main/cond/fromdd",getCurrentDate());
- model.setValue("/root/main/cond/todd",getCurrentDate());
- model.setValue("/root/main/cond/status", "ALL");
- model.setValue("/root/main/cond/orddeptcd", "ALL");
- model.setValue("/root/main/cond/wardcd", "ALL");
- model.refresh();
-
- }
- function fSearch() {
- if (combo2.value == "T") {
- messageBox("[전과/전실]은 생성조건이며, 조회조건으로 사용하실 수 없습니다.", "E999");
- return;
- }
-
- submit("TRMQI03000");
-
- model.setValue("/root/temp/gridcimasterflag","true");
- model.refresh();
-
- }
- function fDetl() {
-
- model.setValue("/root/main/applycount", "");
-
- var selectedRow = grd_cimaster.row;
-
- fGetCIDetailInfo(selectedRow);
-
- }
- function fCreate() {
-
- if ( 6 != messageBox("날짜 구간이 길면 늦어질 수 있습니다 진행할까요?","Q999"))
- {
- return;
- }
-
- // if (model.getValue("/root/main/cond/searchkind") == "CI01" && model.getValue("/root/main/cond/ddflag") == "I") {
- // messageBox("폐렴환자 마스터 생성기준은 퇴원일자로 해주시기 바랍니다.", "E999");
- // model.setFocus("combo2");
- // return;
- // }
- //
- // if (model.getValue("/root/main/cond/searchkind") == "CI02" && (model.getValue("/root/main/cond/ddflag") == "I" || model.getValue("/root/main/cond/ddflag") == "D" )) {
- // if (messageBox("중환자 마스터 생성기준은 중환자실 전과/전실일자로 설정됩니다. 전과/전실일자로 생성하시겠습니까?", "Q999") == "6") {
- // combo2.value = "T";
- // } else {
- // model.setFocus("combo2");
- // return;
- // }
- // }
-
- if (submit("TXMQI00200")) {
- var iCnt = model.getValue("/root/create/rslt/cnt");
- messageBox("["+iCnt + "]건 생성되었습니다.","I999");
- }
-
- }
- function fOpenCreatePopUp(){
- modal("SPMQI03000");
- }
- /**
- * 현재 질지표 Detail 정보 저장
- */
- function fSaveDetail() {
- if (grd_cimaster.row < 1 || model.getValue("/root/main/cimast/instcd") == "") //디테일이 선택되었는지 체크.
- return;
-
- if (combo3.value == "A" && model.getValue(grd_cimaster.nodeset+"[pid='"+ model.getValue("/root/main/cimast/pid")+"']/status") == "A") { //선정인 상태에서 저장이면 "저장" 상태로 자동 변경.. 나머진. 선택한 값으로 변경
- combo3.value = "C";
- }
-
- copyNodesetType("/root/main/detlinfo/formdetl", "/root/main/detlinfo/formdetl", "replace", model, iviewer_detl.model);
- model.makeValue("/root/main/detlinfo/cimast", getPrcpNodeListCSV(instance1.selectNodes("/root/main/cimast")));
- /*
- model.makeNode("/root/main/detlinfo/cimast");
- copyNodesetType("/root/main/detlinfo/cimast", "/root/main/cimast", "replace", model, model);
- model.makeValue("/root/main/detlinfo/formdetl", getNodeListCSV(iviewer_detl.instance1.selectSingleNode("/root/main/detlinfo")));
- */
- if (submit("TXMQI00201")) {
- fSearch();
- }
-
-
- }
- function fAuto() {
-
- var nTotalCount = eval(grd_cimaster.rows - 1 );
-
- var count;
-
- var nTrueCount = 0;
- for(var i = 1; i <= nTotalCount; i ++) {
- if(model.getValue("/root/main/ciinfo/cilist[" + i + "]/flag") == "true"){
- nTrueCount++;
- }
- }
-
- if(messageBox(nTrueCount + "건의 질지표 대상을 일괄저장을","Q004") == 6){
-
- model.setValue("/root/main/applycount", "");
-
- for (count = 1; count <= nTotalCount; count++) {
-
-
- if(model.getValue("/root/main/ciinfo/cilist[" + count + "]/flag") == "true"){
- if(!fGetCIDetailInfo(count)){
- return;
- }
-
- combo3.value = "C";
-
- copyNodesetType("/root/main/detlinfo/formdetl", "/root/main/detlinfo/formdetl", "replace", model, iviewer_detl.model);
- model.makeValue("/root/main/detlinfo/cimast", getPrcpNodeListCSV(instance1.selectNodes("/root/main/cimast")));
- if(!submit("TXMQI00201")) {
- messageBox("작업시 에러발생","I");
- return;
- }
-
- model.setValue("/root/main/applycount", "[ " + count + " / " + nTotalCount + " ]");
- cap_count.refresh();
- }
- }
- messageBox("질지표 대상의 일괄저장을", "I002");
- fSearch();
- }
-
-
-
- }
- function fGetiViewerDetlSrc(){
- var recflag = model.getValue("/root/main/cimast/recflag");
-
- var sSrc = "SMMQI03900_임상질지표_빈화면.xrw";
- return sSrc;
- }
- function fGetCIDetailInfo(nNodeNum){
- model.copyNode("/root/main/cimast", "/root/main/ciinfo/cilist[" + nNodeNum + "]");
-
- iviewer_detl.src = fGetiViewerDetlSrc();
- var recflag = model.getValue("/root/main/cond/searchkind");
-
- model.makeValue("/root/send/condition/hardcdno", fGetHardcdno_title(recflag));
- if(!submit("TRMQI00104")){
- messageBox("TRMQI00104 에러발생", "I");
- return false ;
- }
-
- model.makeNode("/root/main/headinfo");
- copyNodesetType("/root/main/headinfo", "/root/hidden/headinfo","replace", iviewer_detl.model, model);
- iviewer_detl.model.refresh();
-
- model.makeValue("/root/main/cimast/hardcdno", fGetHardcdno_title(recflag));
-
- if(!submit("TRMQI03001")){
- messageBox("TRMQI03001 에러발생", "I");
- return false;
- }
-
- copyNodesetType("/root/main/detlinfo", "/root/main/detlinfo", "replace", iviewer_detl.model, model);
- iviewer_detl.model.refresh();
- model.refresh();
-
- return true;
- }
- function fSetGridCimasterFlag(){
- var nTotalCount = eval(grd_cimaster.rows - 1 );
- var sFlag = "false"
- if(nTotalCount > 0){
- if(model.getValue("/root/temp/gridcimasterflag") == "true"){
- sFlag = "true";
- }
-
- for(var i = 1; i <= nTotalCount; i ++) {
- model.setValue("/root/main/ciinfo/cilist[" + i + "]/flag", sFlag);
- }
- }
-
- }
- function fSetCIMasterStatus(flag){
- var nTotalCount = eval(grd_cimaster.rows - 1 );
- var que ="선정상태로 변경하시겠습니까?";
-
- model.setValue("/root/main/applycount", "");
-
- if(nTotalCount > 0){
-
- var nTrueCount = 0;
- for(var i = 1; i <= nTotalCount; i ++) {
- if(model.getValue("/root/main/ciinfo/cilist[" + i + "]/flag") == "true"){
- nTrueCount++;
- }
- }
-
- if (flag == "D") {
- que = "삭제하시겠습니까?";
- }
-
- if(messageBox(nTrueCount + "건의 질지표 대상을 "+que,"Q") == 6){
-
- for (var j = 1; j <= nTotalCount; j++) {
-
- if(model.getValue("/root/main/ciinfo/cilist[" + j + "]/flag") == "true"){
- model.resetInstanceNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/ciinfo/cilist[" + j + "]");
-
- model.makeValue("/root/send/reqdata/status", flag);
- submit("TXMQI00202");
-
- }
- }
-
- messageBox("정상적으로 처리되었습니다", "I");
-
- fSearch();
- }
- }
-
- }
- function fGetHardcdno_title(recflag){
- var hardcdno;
-
- switch (recflag) {
- case "CI01": //[폐렴]]
- hardcdno = 5640 ;
- sTitle = "폐렴 일괄목록";
- break;
- case "CI02": //[중환자]]
- hardcdno = 5641 ;
- sTitle = "중환자 일괄목록";
- break;
- case "CI03": //[수술 감염 예방적 항생제]]
- hardcdno = 5642 ;
- sTitle = "수술 감염 예방적 항생제 일괄목록";
- break;
- case "CI04": //[CABG]]
- hardcdno = 5643 ;
- sTitle = "CABG 일괄목록";
- break;
- case "CI05": //[급성심근경색증]]
- hardcdno = 5644 ;
- sTitle = "급성심근경색증 일괄목록";
- break;
- case "CI06": //[PCI]]
- hardcdno = 5645 ;
- sTitle = "PCI 일괄목록";
- break;
- case "CI07":
- hardcdno = 5646 ;
- sTitle = "일괄목록";
- break;
- case "CI08":
- hardcdno = 5647 ;
- sTitle = "일괄목록";
- break;
- case "CI09": //[폐암]]
- hardcdno = 5648 ;
- sTitle = "폐암일괄목록";
- break;
- case "CI10": //[폐암(수술환자대상)]]
- hardcdno = 5649 ;
- sTitle = "폐암(수술환자대상)일괄목록";
- break;
- case "CI11": //[유방암]]
- hardcdno = 5663 ;
- sTitle = "유뱡암일괄목록";
- break;
- case "CI12": //[폐렴(본원)]]
- hardcdno = 5639 ;
- sTitle = "폐렴(본원)일괄목록";
- break;
- }
- return hardcdno;
- }
|