123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371 |
- /*
-
- 외래환자 설명, 안내문출력 (SMMNO02900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xOutRsrvPatListPath = "/root/main/outrsrvpatlist";
- var xOutRsrvPatCodeListPath = "/root/main/outrsrvpatcodelist";
- var uijeongbuinstcd="", sunggainstcd="", vincentinstcd=""; // 의정부성모,부천성가, 성빈센트병원기관코드_20090606
- var tdayAcptYN = "N"; // 외래진료예약 시 당일접수환자포함 조회 병원 (2009.06.23 JJE)
- /**
- * @group :
- * @ver : 2009.07.30
- * @by : 성미연
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- grd_OutRsrvPatList.fixedcellcheckbox(0, grd_OutRsrvPatList.colRef("chk")) = true;
-
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
-
- var instcd = getUserInfo("dutplceinstcd");
- var standard_yn = "rcptuseyn";
- var ord_deptflag = 'X';
- var rslt_ref = "/root/init/orddept";
- var sort_field = "depthngnm";
- var sort_method = "asc";
- var dt = getCurrentDate();
- //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
- model.setValue("/root/main/cond/orddd", dt);
-
- // 간호외래진료부서콤보 (특정하위부서를 포함- 분만실, 육아상담실, 인공신장실)
- zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, dt);
- addComboInstance("/root/init/orddept", "deptcd^depthngnm", "0000000000^전체진료과", "dept"); //진료부서 콤보 전체추가
-
- model.resetInstanceNode("/root/main/cond/orddept");
-
- // 공통코드 스크립트 호출
- zbcfGetCodeList( new Array("Z0008"), new Array("/root/init/comcd"));
- var dutplcecd = getUserInfo("dutplcecd"); // 근무지부서코드
- var suporddeptcd = getUserInfo("ordsupdeptcd");
-
- if (dutplcecd != "") {
- model.setValue("/root/main/cond/orddeptcd", dutplcecd); // 근무지부서코드
- fDeptDoctSearch(); // 의사리스트조회
- }
-
- /*
- // 간호 환경설정테이블 조회
- var pCode = "'065', '077', '107'"; // 조회할 CdGrupID 코드정보
- var pDate = getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- for(var i=1; i<=getNodesetCount("/root/code/codeinfo/codelist"); i++){
- switch (model.getValue("/root/code/codeinfo/codelist["+i+"]/cdgrupid")){
- case "065": // 내과
- MDdeptcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid");
- break;
- case "077": // 의정부성모병원기관코드_20090606
- switch(model.getValue("/root/code/codeinfo/codelist["+i+"]/supcdid")){
- case "02": // (01:서울성모,02:의정부성모,03:부천성가, 04:성빈센트)
- uijeongbuinstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid");
- break;
- case "03": // (01:서울성모,02:의정부성모,03:부천성가, 04:성빈센트)
- sunggainstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid");
- break;
- case "04": // (01:서울성모,02:의정부성모,03:부천성가, 04:성빈센트)
- vincentinstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid");
- break;
- }
- case "107": // 외래진료예약 시 당일접수환자포함 조회 병원 (2009.06.23 JJE)
- if( model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid") == getUserInfo("dutplceinstcd") )
- tdayAcptYN = "Y";
- break;
- }
- }
- */
-
- /*
- // 성가, 의정부, 성빈센트병원 요청: 출력용도에 [당일접수포함] 선택, 당일접수포함 선택후 출력용도 선택시에는 당일접수환자 포함하여 게시판용,업무용의 명단이 출력되도록 해야 함 (2009.06.23 JJE)
- model.setValue("/root/main/cond/gettdayacptyn", tdayAcptYN);
- if(tdayAcptYN == "Y" ){
- bol_tdayacptyn.visible = true;
- cap_tdayacptyn.visible = true;
- }else{
- bol_tdayacptyn.visible = false;
- cap_tdayacptyn.visible = false;
- }
- */
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.09.17
- * @by : 문창곤
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과의 의사 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDeptDoctSearch(typegubn){
- cmb_orddr.disabled = false;
-
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
-
- if(model.getValue("/root/main/cond/orddeptcd") == "0000000000" && model.getValue("/root/main/cond/pid") == "") {
- //messageBox("전체진료과는 현재 조회할 수 없습니다", "E");
- //return;
-
- }
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/orddd"));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
-
- var sordclsdeptflag = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // 센터/대표/분과/서브 구분
- var ssupdeptcd = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // 상위부서코드
- var sorddeptkind = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // 센터/대표 구분
-
- var sorddeptflag = "";
-
- if (sorddeptkind == "C") { // 센터이면
- sorddeptflag = "C";
- //} else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // 센터가 아니면서 분과이면
- // sorddeptflag = "A";
- } else { // 그외에 기타과
- sorddeptflag = "etc";
- }
-
- model.setValue("/root/main/cond/ordclsdeptflag",sorddeptflag);
- model.setValue("/root/main/cond/supdeptcd",ssupdeptcd);
-
- model.makeValue("/root/send/reqdata/ordclsdeptflag", model.getValue("/root/main/cond/ordclsdeptflag"));
- model.makeValue("/root/send/reqdata/supdeptcd", model.getValue("/root/main/cond/supdeptcd"));
-
- submit("TRMNO00104");
-
- if(getNodesetCount("/root/init/orddr/orddr") > 0){
- for(var i = 0; i < grd_OutRsrvPatList.cols;i++) {
- grd_OutRsrvPatList.colsort(i) = "asc";
- }
- //addComboInstance("/root/init/orddr", "userid^usernm", "00000000^전체의사", "orddr"); //진료의콤보 전체추가
- addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^전체의사", "orddr"); //진료의콤보 전체추가
-
- model.resetInstanceNode("/root/main/cond/orddr");
- } else {
- model.makenode("/root/init/orddr");
- model.makenode("/root/init/orddr/orddr");
- model.makenode("/root/init/orddr/orddr/userid");
- model.makenode("/root/init/orddr/orddr/usernm");
- //addComboInstance("/root/init/orddr", "userid^usernm", "00000000^전체의사", "orddr"); //진료의콤보 전체추가
- addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^전체의사", "orddr"); //진료의콤보 전체추가
-
- cmb_orddr.select(0);
-
- }
- model.setValue("/root/main/cond/orddeptnm", cmb_orddept.label);
- cmb_orddr.refresh();
- }
- /**
- * @group :
- * @ver : 2009.07.30
- * @by : 성미연
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자설명, 안내문출력 환자리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBtnRefClicked(){
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
-
- var sorddept = model.getValue("/root/main/cond/orddeptcd");
- var sorddr = model.getValue("/root/main/cond/orddr");
-
- var rsrvflag7 = model.getValue("/root/main/cond/rsrvflag7"); // 기타포함
- var sOrdDD = model.getValue("/root/main/cond/orddd");
- if(cmb_orddept.value == "") {
- messageBox("진료과를 선택하지 ","E007");
- return;
- }
- //진료의 확인추가(진료의선택하지않아도 전체의사조회됨)-20090910-kys
- if(cmb_orddr.value == "") {
- messageBox("진료의를 선택하지 ","E007");
- return;
- }
-
- model.makenode("/root/send/req");
- model.copynode("/root/send/req", "/root/main/cond");
- model.makeValue("/root/send/req/ordfromdd", sOrdDD);
- model.makeValue("/root/send/req/ordtodd", sOrdDD);
-
-
- if(submit("TRMNO01801")){
- model.setValue("/root/main/cond/cnt", grd_OutRsrvPatList.rows-1);
- opt_cnt.refresh();
-
- grd_OutRsrvPatList.fixedcellischeck(0, grd_OutRsrvPatList.colRef("chk")) = true;
- for(var i = 1; i <= getNodesetCount("/root/main/outrsrvpatlist/outrsrvpatinfo"); i++){
- //화면 로딩후 바로 출력버튼 클릭시 선택된내역이 없다는 창이 뜨는 오류로 수정함-20090928-kys(true->Y)
- model.setValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/chk", "Y");
- }
-
- }
- model.setValue("/root/main/cond/orddrnm", cmb_orddr.label);
-
- grd_OutRsrvPatList.refresh();
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.07.30
- * @by : 성미연
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 외래환자설명, 안내문 출력
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickPrint(){
- if (grd_OutRsrvPatList.findRow("Y", 1, grd_OutRsrvPatList.colRef("chk")) == "-1"){
- messageBox("선택된 내역이 없습니다.", "I");
- return;
- }
-
- //var printYN = "N";
-
- for(var i = 0; i < grd_OutRsrvPatList.rows;i++) {
- var chk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/chk");
- var pid = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/pid");
- var orddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/orddeptcd");
-
- var SRow = grd_OutRsrvPatList.findRow(pid, 1, grd_OutRsrvPatList.colRef("pid"));
- var SChk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + SRow + "]/chk");
- var SOrddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + SRow + "]/orddeptcd");
-
- if(chk == "Y"){
- if(SChk == "Y" && orddeptcd == SOrddeptcd && SRow != "-1" && SRow < i){ //다른유형으로 접수됐을 경우 한번만 출력되도록 함
- continue;
- }else{
- model.removenode("/root/temp/printdata");
- //send 재구성
- model.makeValue("/root/temp/printdata","");
- model.copyNode("/root/temp/printdata", "/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]");
-
- exeReportPreview("RPMNO02900", "XMLSTR", "", "", "true", "", "", "", "", "true"); //미리보기 뜨지 않음
- //exeReportPreview("RPMNO02900", "XMLSTR", "", "", "", "", "", "", "", "true");
- }
- }
-
- /*
- if(chk == "Y"){
- for(var k = 0; k < grd_OutRsrvPatList.rows;k++) {
- var SPid = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/pid");
- var SChk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/chk");
- var SOrddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/orddeptcd");
-
- if(pid == SPid && SChk == "Y" && orddeptcd == SOrddeptcd && i > k){
- printYN = "N";
-
- }else{
- printYN = "Y";
- }
- }
- if(printYN == "Y"){
- model.removenode("/root/temp/printdata");
- //send 재구성
- model.makeValue("/root/temp/printdata","");
- model.copyNode("/root/temp/printdata", "/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]");
-
- //exeReportPreview("RPMNO02900", "XMLSTR", "", "", "true", "", "", "", "", "true"); //미리보기 뜨지 않음
- exeReportPreview("RPMNO02900", "XMLSTR", "", "", "", "", "", "", "", "true");
- }
- }
- */
-
- }
-
- grd_OutRsrvPatList.fixedcellischeck(0, grd_OutRsrvPatList.colRef("chk")) = false;
- grd_OutRsrvPatList.refresh();
- }
-
- /**
- * @desc : 콤보박스에 원하는 instance node와 value를 설정
- * @
- * @param :
- * @event :
- * @return :
- * @---------------------------------------------------
- */
- function addComboInstance(combopath, nodename, nodeval, parentnode){
- nodename = nodename.split("^");
- nodeval = nodeval.split("^");
- if(nodename.length != nodeval.length){
- return;
- }
-
- var label = model.instances(0).createElement(nodename[0]);
- var val = model.instances(0).createElement(nodename[1]);
- var combo = model.instances(0).createElement(parentnode);
- label.value = "" + nodeval[0] + "";
- val.value = "" + nodeval[1] + "";
-
- combo.appendChild(label);
- combo.appendChild(val);
-
- chkNode = model.instances(0).selectSingleNode(combopath);
- if(chkNode == null){
- model.makeNode(combopath);
- srcNode = model.instances(0).selectSingleNode(combopath);
- }else{
- srcNode = model.instances(0).selectSingleNode(combopath);
- }
-
- desNode = model.instances(0).selectSingleNode(combopath + "/" + parentnode);
- srcNode.insertBefore(combo, desNode);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.11.16
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자메모
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPatMemo() {
- var pid = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("pid"));
- var hngnm = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("patnm"));
- var orddeptcd = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("orddeptcd"));
-
- setParameter("SPMNO02300_PARM", pid + "▦" + hngnm + "▦" + orddeptcd);
- modal("../../../emr/outcareweb/xrw/SPMNO02300", "","", "", "SPMNO02300", "", "");
- }
|