123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- /*
-
- 주사실 기타 처치등록 관리(SMMNI00500.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xBizExecInfoListPath = "/root/main/execinfo/execinfolist";
- //20090512 dhkim 사용자부서정보
- var userdeptcd = getUserInfo("dutplcecd");
- //20090512 dhkim 주사실코드
- var injdeptcd;
-
- /**
- * 20090506 dhkim
- * 초기화펑션추가
- */
- function fInit(){
- //20090512 dhkim 주사실코드 가져오기
- if(!submit("TRMNI00504")){
- messageBox("주사실코드조회를", "E009");
- return false;
- }
- injdeptcd = model.getValue("/root/hidden/injcdinfo/injdeptcd");
-
- //시행부서조건추가 (20090506 현재 육아상담실, 소아청소년과, 중앙주사실)
- model.removenode('/root/send');
- model.makeValue('/root/send/cdgrupid', '075');
- if(!submit('TRMNI01302')){
- messageBox('시행부서 초기화를', 'E009');
- return false;
- }
-
- //20090512 dhkim 사용자정보가 주사실일 경우는 주사실만 보여지고 주사실이 아니면 주사실만 빼고 보여줌.
- //노드에서 제거
- fSetNodeExecUserDept();
-
- // model.setValue('/root/main/rgst/execdeptcd', userdeptcd);
- model.refresh();
-
-
- model.removeNodeset("/root/main/execinfo/execinfolist");
- model.removeNodeset("/root/main/execinfo/statsinfolist");
-
- ipt_ordd.value = getCurrentDate();// 조회구간에 현재날짜(디폴트)
- ipt_fromdd.value = getCurrentDate();// 조회구간에 현재날짜(디폴트)
- ipt_todd.value = getCurrentDate();// 조회구간에 현재날짜(디폴트)
-
- var param = opener.javascript.getParameter("SMMNI00500_pid");
- if (isNull(param)) {
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/paminfo", node);
- var uppid = model.getValue("/root/main/paminfo/list/pid");
-
- if(uppid != ""){
-
- ipt_pid.value = model.getValue("/root/main/paminfo/list/pid");
-
- fpidref();//등록번호에 따른 환자정보 검색
- }
- } else {
- ipt_pid.value = param;
- fpidref();//등록번호에 따른 환자정보 검색
-
- }
-
- fdetlcd();//처치 내역에따른 처치명 조회
-
- fEtcCureList();// 시행리스트, 통계 조회
-
- }
- /*************************************************************************************************************
- * 20090512 dhkim
- * 전체노드중 주사실사용자는 주사실노드만 재구성,
- * 소아청소년과/육아상담실은 주사실제외후 재구성
- *------------------------------------------------------------------------------------------------------------
- * 20090603 dhkim
- * supcdid파라미터 구성 배열로 변경
- * supcdid[0]예방주사비활성화여부(Y:비활성, N:활성)
- * supcdid[1]겸직사용자여부 (Y:겸직, N:비겸직)
- *************************************************************************************************************/
- function fSetNodeExecUserDept(){
-
- //노드초기화
- model.removenodeset('/root/init');
- model.makeNode('/root/init/execinfo/execinfolist');
- copyNodesetType('/root/init/execinfo/execinfolist', '/root/hidden/execinfo/execinfolist');
- addComboItem("cmb_execdeptcd", "전체", "ALL");
- cmb_execdeptcd.select(0);
- for ( var nCnt = 0; nCnt < cmb_execdeptcd.length; nCnt++ ) {
- if ( cmb_execdeptcd.item(nCnt).value == userdeptcd ) {
- cmb_execdeptcd.select(nCnt);
- break;
- }
- }
- /*
- var nodeCnt = getNodesetCount("/root/hidden/execinfo/execinfolist");
- var basecd, basenm, supcdid;
-
- //20090604 dhkim bmt주사실의 추가로 노드구성을 변경함
- //supcdid를 배열로 만들어 [0]번에 기타처치등록가능여부, [1]번에 콤보노드구성 (로그인부서2개이상여부) 체크함
- //ex) supcdid = Y|Y 또는 N|Y , Y|N, N|N 등으로 입력됨
- // supcdid[0] = Y: 기타처치,예방주사 모두등록가능
- // supcdid[0] = N: 기타처치만 등록가능함
- // supcdid[1] = Y: 사용자의 부서가 여러개가 올수있음 (예 : 소아청소년과, 육아상담실 겸직)
- // supcdid[1] = N: 사용자의 부서가 단일과로 구성됨. (예 : 중앙주사실, BMT주사실)
- var supcdidSplit, isMultiDept;
-
- var newNodeCnt = 0;
- for(var i = 1; i <= nodeCnt; i++){
-
- basecd = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/basecd");
- supcdid = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/supcdid");
- supcdidSplit = supcdid.split("|");//20090604 dhkim 배열로 분리
-
- if(basecd == userdeptcd){
- isMultiDept = supcdidSplit[1];//겸직여부를 찾는다.
- }
- }
-
- for(var i = 1; i <= nodeCnt; i++){
-
- basecd = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/basecd");
- basenm = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/basenm");
- supcdid = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/supcdid");
-
- //20090604 dhkim 배열로 분리
- supcdidSplit = supcdid.split("|");
- supcdid = supcdidSplit[1];
-
- if(isMultiDept == 'Y'){
- if(supcdid == 'Y'){
- newNodeCnt++;
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basecd', basecd);
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basenm', basenm);
- }
- }else if(isMultiDept == 'N'){
- if(basecd == userdeptcd){
- newNodeCnt++;
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basecd', basecd);
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basenm', basenm);
- return;
- }
- }
- }
- /*
- for(var i = 1; i <= nodeCnt; i++){
-
- basecd = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/basecd");
- basenm = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/basenm");
-
- supcdid = model.getValue("/root/hidden/execinfo/execinfolist[" + i + "]/supcdid");
-
- //사용자부서가 주사실이면 주사실노드만 만들것
- if(injdeptcd == userdeptcd){
- if(supcdid == "N"){
- newNodeCnt++;
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basecd', basecd);
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basenm', basenm);
- }
- }else{
- if(supcdid == "Y"){
- newNodeCnt++;
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basecd', basecd);
- model.makeValue('/root/init/execinfo/execinfolist[' + newNodeCnt + ']/basenm', basenm);
- }
- }
- }
- */
-
- }
- /**
- * @group :
- * @ver : 2007.08.01
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 처치 내역에따른 처치명 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fdetlcd(){
-
- var cdclslist = model.getValue("/root/main/rgst/recflag")
- var baseclsflag = cdclslist.substring(0,1);
- var cdcls = cdclslist.substring(0,2);
- model.makeValue("/root/send/baseclsflag",baseclsflag);
- model.makeValue("/root/send/cdcls",cdcls);
- model.makeValue("/root/send/supbasetypecd",model.getValue("/root/main/rgst/recflag"));
-
- //20090511 dhkim 시행부서조건추가
- model.makeValue("/root/send/execdeptcd",model.getValue("/root/main/rgst/execdeptcd"));
- if(submit("TRMNI00503")){
- }
- }
- /**
- * @group :
- * @ver : 2007.06.01
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 등록번호에 따른 환자정보 검색
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fpidref(){
- model.removeNodeset("/root/send");
- var pid = ipt_pid.value
- model.makeValue("/root/send/pid",pid);
- if(submit("TRMNI00501")){
- var hngnm=model.getValue("/root/main/rgst/rgstrinfo/rgstlist/hngnm");
- //데이타가 없을시 이전 출력 내용 삭제.
- if(hngnm==""){
- opt_hngnm.value="";
- opt_gndrage.value="";
- opt_hngnm.refresh();
- opt_gndrage.refresh();
- model.makeValue("/root/main/rghtref/rghtreflist/pid","");
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.06.01
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자번호 조회 돋보기 클릭시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPatSrch(){
-
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
- //환자번호 copy
- var popupendflag = model.getValue("/root/main/popupendflag");
- if (popupendflag == "ok"){
-
- model.setValue("/root/main/rgst/rgstrinfo/rgstlist/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.refresh();
- var pid = "/root/main/rgst/rghtinfo/rghtlist/pid";
- if (pid != null && pid != "" && pid != " " && pid != "-"){
- fpidref("new");
- }
- }
- }
-
-
- /**
- * @group :
- * @ver : 2007.06.04
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기타 처치등록 실시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEtcCureSave(){
-
- var hngnm = model.getValue("/root/main/rgst/rgstrinfo/rgstlist/hngnm");
- var detlcd = model.getValue("/root/main/rgst/detlcd");
- var execdd = model.getValue("/root/main/rgst/execdd");
- //20090512 dhkim 시행부서추가
- var execdeptcd = model.getValue("/root/main/rgst/execdeptcd");
-
- if(execdeptcd == "ALL"){
- messageBox("시행부서가 선택되지", "E007");
- return;
- }
-
- if(hngnm==""){
- messageBox("환자가 선택되지", "E007");
- return;
- }
-
- if(detlcd=="1"){
- messageBox("처치 내역이 선택되지", "E007");
- return;
- }
-
-
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/execdd", model.getValue("/root/main/rgst/execdd"));
- model.makeValue("/root/send/pid", model.getValue("/root/main/rgst/rgstrinfo/rgstlist/pid"));
- model.makeValue("/root/send/recflag", model.getValue("/root/main/rgst/recflag"));
- model.makeValue("/root/send/detlcd", model.getValue("/root/main/rgst/detlcd"));
-
- //20090512 dhkim 시행부서추가
- model.makeValue("/root/send/execdeptcd", model.getValue("/root/main/rgst/execdeptcd"));
-
- if(submit("TXMNI00501")){
- messageBox("저장이", "I002");
- ipt_fromdd.value = execdd;
- ipt_todd.value = execdd;
- fEtcCureList();//기타 처치시행 리스트 조회
- }
- }
-
-
- /**
- * @group :
- * @ver : 2007.06.04
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기타 처치시행 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEtcCureList(){
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/fromdd", model.getValue("/root/main/refexec/fromdd"));
- model.makeValue("/root/send/todd", model.getValue("/root/main/refexec/todd"));
- model.makeValue("/root/send/recflag", model.getValue("/root/main/refexec/recflag"));
- //20090512 dhkim 시행부서추가
- model.makeValue("/root/send/execdeptcd", model.getValue("/root/main/rgst/execdeptcd"));
-
- if(submit("TRMNI00502")){
- }
- }
-
-
- /**
- * @group :
- * @ver : 2007.06.05
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기타 처치시행 리스트 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEtcCuredel(){
- var Row = grd_execinfo.rows;
- var chek = 0;
- for (i=1; i<Row; i++){
- chek = chek + grd_execinfo.textmatrix(i,1);
- }
- if(chek==0){
- messageBox("하나 이상의 내역을", "C002")
- return;
- }
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/execinfo",grd_execinfo.getupdatedataAll("i"));
- if(submit("TXMNI00502")){
- fEtcCureList();
- }
- }
- function fSelectExecdeptcd() {
- var val = cmb_execdeptcd.value;
- btn_save.disabled = !( val == userdeptcd );
- }
|