123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/*
-
- 적출물리스트관리(SMMNP00310.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xExtListPath = "/root/main/extinfo/extlist";
- var sFlag = "c";
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- //인스턴스초기화
- ds_send_reqdata.clearData();
- ds_hidden_confpsninfo_confpsnlist.clearData();
- ds_main_extinfo_extlist.clearData();
- ds_cond.clearData();
-
- ds_send_reqdata.addRow();
- ds_cond.addRow();
-
- //조회조건 초기화
- ds_cond.setColumn(0, "fromdd", utlf_getCurrentDate());
- ds_cond.setColumn(0, "todd", utlf_getCurrentDate());
- ds_cond.setColumn(0, "rdocond", sFlag);
- ds_main_ipt_extinfo.setColumn(0, "remvdd", utlf_getCurrentDate());
- ds_main_ipt_extinfo.setColumn(0, "checknurid", sysf_getUserInfo("userid"));
-
- //**공통코드 가져오기**//
- //콤보리스트 셋팅(감염성 질환)
- var arrParam = [{dsNm: "ds_init_M0194list_M0194", cdGrpId: "M0194"}
- ,{dsNm: "ds_init_DisplayData_S02", cdGrpId: "S02"}
- ,{dsNm: "ds_init_DisplayData_S03", cdGrpId: "S03"}]
- appf_getCodeList(arrParam);
-
- // tbGetBscdList( new Array("S02", "S03"), //yjh : 사용안하는듯...
- // new Array("/root/init/DisplayData", // S02 간호사
- // "/root/init/DisplayData" // S03 수술방
- // )
- // );
-
- //수술실간호사리스트 조회(확인자콤보)
- fGetOpNrList();
-
- //화면 버튼 설정
- fValueChangedInfectRdo(sFlag);
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- ds_main_extinfo_extlist.setColumn(i, "chk", "1");
- }
-
- //속도개선
- this.setTimer(0, 100);
- //fSearch();
- }
- /**
- * @group :
- * @ver : 2008.07.02
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술실간호사리스트조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetOpNrList(){
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(0, "deptflag", "015");
- ds_send_reqdata.setColumn(0, "searchdd", utlf_getCurrentDate());
-
- var oParam = {};
- oParam.id = "TRAVT00132";
- oParam.service = "tissuebankapp.TissueBankProcess";
- oParam.method = "reqGetNrList";
- oParam.inds = "reqdata=ds_send_reqdata";
- oParam.outds = "ds_hidden_confpsninfo_confpsnlist=confPsnList";
- oParam.async = false;
- oParam.callback = "cf_TRAVT00132";
- tranf_submit(oParam);
- }
- function cf_TRAVT00132(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0){
- sysf_messageBox('초기화를', 'E009');
- return;
- }
-
- ds_hidden_confpsninfo_confpsnlist.updateColID("userid", "cd");
- ds_hidden_confpsninfo_confpsnlist.updateColID("usernm", "nm");
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 회복환자조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- var fromdd = ds_cond.getColumn(0, "fromdd");
- var todd = ds_cond.getColumn(0, "todd");
- var rdocond = ds_cond.getColumn(0, "rdocond");
-
- if(utlf_isNull(fromdd)){
- fromdd = utlf_getCurrentDate();
- }
-
- if(utlf_isNull(todd)){
- todd = utlf_getCurrentDate();
- }
-
- ds_cond.setColumn(0, "fromdd", fromdd);
- ds_cond.setColumn(0, "todd", todd);
-
- ds_main_extinfo_extlist.clearData();
- ds_main_totextinfo.setColumn(0, "totextcrcnt", "");
- ds_main_totextinfo.setColumn(0, "totextcrweig", "");
- ds_main_ipt_extinfo.setColumn(0, "remvdd", utlf_getCurrentDate());
- ds_main_ipt_extinfo.setColumn(0, "checknurid", sysf_getUserInfo("userid"));
-
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(0, "fromdd", fromdd);
- ds_send_reqdata.setColumn(0, "todd", todd);
- ds_send_reqdata.setColumn(0, "rdocond", rdocond);
-
- var oParam = {};
- oParam.id = "TRAVT00131";
- oParam.service = "tissuebankapp.TissueBankProcess";
- oParam.method = "reqGetAvtTbeoInfoList";
- oParam.inds = "reqdata=ds_send_reqdata";
- oParam.outds = "ds_main_extinfo_extlist=extlist";
- oParam.async = false;
- oParam.callback = "cf_TRAVT00131";
- tranf_submit(oParam);
- }
- function cf_TRAVT00131(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0){
- sysf_messageBox('적출물리스트조회를', 'E009');
- return;
- }
-
- if(ds_main_extinfo_extlist.rowcount < 1){
- group3.btn_print.enable = false;
- group3.btn_saveexcel.enable = false;
- group3.btn_save.enable = false;
- group3.btn_cncl.enable = false;
- group3.ipt_remvdd.enable = false;
- group3.ipt_remvnm.enable = false;
- group3.cmb_checknurid.enable = false;
- ds_main_totextinfo.setColumn(0, "totextcrcnt", "0");
- ds_main_totextinfo.setColumn(0, "totextcrweig", "0");
- }else{
- group3.btn_print.enable = true;
- group3.btn_saveexcel.enable = true;
- group3.btn_save.enable = true;
- group3.btn_cncl.enable = true;
- group3.ipt_remvdd.enable = true;
- group3.ipt_remvnm.enable = true;
- group3.cmb_checknurid.enable = true;
- var totalCnt = 0;
- var totalWeig = 0;
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- infectInfo = "";
- var infectArray;
-
- if( !utlf_isNull(ds_main_extinfo_extlist.getColumn(i, "infectflag")) ){
- infectArray = ds_main_extinfo_extlist.getColumn(i, "infectflag").split(" ");
- }else{
- infectArray = new Array();
- }
-
- for( var j=0 ; j<ds_init_M0194list_M0194.rowcount ; j++ ){
- for( var k=0 ; k<=infectArray[k] ; k++ ){
- if(infectArray[k] == ds_init_M0194list_M0194.getColumn(j, "cdid")){
- if(infectInfo == ""){
- infectInfo = ds_init_M0194list_M0194.getColumn(j, "cdnm");
- }else{
- infectInfo += ", " + ds_init_M0194list_M0194.getColumn(j, "cdnm");
- }
- }
- }
- }
- //감염정보 입력
- ds_main_extinfo_extlist.setColumn(i, "infectflag", infectInfo);
-
- //총 개수, 총 중량 합계
- if(ds_main_extinfo_extlist.getColumn(i, "extcrcnt").isNumber()== true){
- totalCnt += eval(ds_main_extinfo_extlist.getColumn(i, "extcrcnt"));
- }
- if(ds_main_extinfo_extlist.getColumn(i, "extcrweig").isNumber() == true ){
- totalWeig += eval(ds_main_extinfo_extlist.getColumn(i, "extcrweig"));
- }
- }
-
- //총 개수, 총 중량 입력
- ds_main_totextinfo.setColumn(0, "totextcrcnt", totalCnt);
- ds_main_totextinfo.setColumn(0, "totextcrweig", totalWeig);
- }
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 적출물리스트 수거일자, 수거자, 확인자 수정
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
- if(fIsValid()){
- ds_send_reqdata.clearData();
-
- ds_send_reqdata.enableevent = false;
- ds_send_reqdata.updatecontrol = false;
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- var nRow = ds_send_reqdata.addRow();
- ds_send_reqdata.copyRow(nRow, ds_main_extinfo_extlist, i);
- ds_send_reqdata.setRowType(nRow, "i");
-
- if( ds_send_reqdata.getColumn(nRow, "chk") == "1" ){
- ds_send_reqdata.setColumn(nRow, "chk", "Y");
- }
- }
-
- ds_send_reqdata.updatecontrol = true;
- ds_send_reqdata.enableevent = true;
-
- grdf_setStatusColumn(ds_send_reqdata, "status");
-
- var oParam = {};
- oParam.id = "TXAVT00131";
- oParam.service = "tissuebankapp.TissueBankProcess";
- oParam.method = "reqSetAvtTbeoInfoList";
- oParam.inds = "reqdata=ds_send_reqdata";
- //oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_TXAVT00131";
- tranf_submit(oParam);
- }
- }
- function cf_TXAVT00131(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0){
- sysf_messageBox('적출물정보 수정을', 'E009');
- return;
- }
-
- fSearch();
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 적출물정보 수정하기전 유효성체크
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIsValid(){
- if(ds_main_extinfo_extlist.findRow("chk", "1") < 1){
- sysf_messageBox("수정 또는 저장할 내역을 선택하십시요","I");
- return;
- }
-
- //체크한 환자의 적출물은 입력된 내역으로 한꺼번에 반영하도록 한다.
- //입력받는 내역 : 수거일자, 수거자, 확인자
- var chk;
- var remvdd = ds_main_ipt_extinfo.getColumn(0, "remvdd"); //입력받은 수거일자
- var remvnm = ds_main_ipt_extinfo.getColumn(0, "remvnm"); //입력받은 수거자
- var checknurid = ds_main_ipt_extinfo.getColumn(0, "checknurid"); //입력받은 확인자
-
- if(utlf_isNull(remvdd)){
- sysf_messageBox('수거일자를', 'C001');
- return false;
- }
- if(utlf_isNull(remvnm)){
- sysf_messageBox('수거자를', 'C001');
- return false;
- }
- if(utlf_isNull(checknurid)){
- sysf_messageBox('확인자를', 'C002');
- return;
- }
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- chk = ds_main_extinfo_extlist.getColumn(i, "chk");
- if(chk == '1'){
- //체크된 환자에게 입력한 적출물 수거 정보를 세팅한다.
- ds_main_extinfo_extlist.setColumn(i, "remvdd", remvdd);
- ds_main_extinfo_extlist.setColumn(i, "remvnm", remvnm);
- ds_main_extinfo_extlist.setColumn(i, "checknurid", checknurid);
- }
- }
-
- return true;
- }
- /**
- * @group :
- * @ver : 2008.07.02
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Excel파일로 저장
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- var exceldd = utlf_getCurrentDate();
-
- if(group3.grp_sea.rdo_rdocond.value == "b"){
- exceldd = group3.grp_sea.ipt_fromdd.value;
- }
-
- if( ds_main_extinfo_extlist.rowcount > 0 ){
- grdf_exportExcel(group3.grd_extlist, "적출물리스트", "적출물리스트_"+exceldd, false, "", "user", false);
- } else {
- sysf_messageBox("조회된 데이터가 ", "I004");
- }
- }
- /**
- * @group :
- * @ver : 2008.07.02
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 미수거리스트 출력물 미리보기 실행
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPrint(){
- if(ds_main_extinfo_extlist.findRow("chk", "1") < 1){
- sysf_messageBox("출력할 내역을 선택하십시요","I");
- return;
- }
-
- dsf_createDs("ds_prnt_extinfo_extlist");
-
- totalCnt = 0;
- totalWeig = 0;
- prntyy = "";
- prntmm = "";
- prntdd = "";
-
- ds_prnt_extinfo_extlist.assign(ds_main_extinfo_extlist);
- ds_prnt_extinfo_extlist.clearData();
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- chk = ds_main_extinfo_extlist.getColumn(i, "chk");
- if(chk == '1'){
- //체크된 정보 copy
- noderow = eval(ds_prnt_extinfo_extlist.rowcount) + 1;
- var nRow = ds_prnt_extinfo_extlist.addRow();
- ds_prnt_extinfo_extlist.copyRow(nRow, ds_main_extinfo_extlist, i);
-
- //총 개수, 총 중량 합계
- if(ds_main_extinfo_extlist.getColumn(i, "extcrcnt").isNumber()== true){
- totalCnt += eval(ds_main_extinfo_extlist.getColumn(i, "extcrcnt"));
- }
- if(ds_main_extinfo_extlist.getColumn(i, "extcrweig").isNumber() == true ){
- totalWeig += eval(ds_main_extinfo_extlist.getColumn(i, "extcrweig"));
- }
- }
- }
-
- if(group3.grp_sea.rdo_rdocond.value == "a"){
- prntdd = ds_cond.getColumn(0, "fromdd").substr(0,4) + "-" + ds_cond.getColumn(0, "fromdd").substr(4,2) + "-" + ds_cond.getColumn(0, "fromdd").substr(6,2) + " ~ "
- + ds_cond.getColumn(0, "todd").substr(0,4) + "-" + ds_cond.getColumn(0, "todd").substr(4,2) + "-" + ds_cond.getColumn(0, "todd").substr(6,2);
- }else if(group3.grp_sea.rdo_rdocond.value == "b"){
- prntyy = ds_cond.getColumn(0, "fromdd").substr(0,4) + "년";
- prntmm = ds_cond.getColumn(0, "fromdd").substr(4,2) + "월";
- prntdd = ds_cond.getColumn(0, "fromdd").substr(6,2) + "일";
- }else if(group3.grp_sea.rdo_rdocond.value == "c"){
- prntyy = ds_main_ipt_extinfo.getColumn(0, "remvdd").substr(0,4) + "년";
- prntmm = ds_main_ipt_extinfo.getColumn(0, "remvdd").substr(4,2) + "월";
- prntdd = ds_main_ipt_extinfo.getColumn(0, "remvdd").substr(6,2) + "일";
- }
-
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- rptf_setNodeListToDOM(objDOM, "/root/prnt/extinfo/extlist", ds_prnt_extinfo_extlist); // 데이터셋 1
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/prntflag", group3.grp_sea.rdo_rdocond.value); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/prntyy", prntyy); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/prntmm", prntmm); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/prntdd", prntdd); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/totextcrcnt", totalCnt); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/prnt/totextinfo/totextcrweig", totalWeig); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/cond/fromdd", ds_cond.getColumn(0, "fromdd")); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/cond/todd", ds_cond.getColumn(0, "todd")); // 데이터셋 2
- rptf_setValueToDOM(objDOM, "/root/cond/rdocond", ds_cond.getColumn(0, "rdocond")); // 데이터셋 2
-
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
-
- var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
-
- rptf_exeReportPreview30(["RPAVT00130"],[objParam], option);
-
- dsf_deleteDs("ds_prnt_extinfo_extlist");
- }
- /**
- * @group :
- * @ver : 2008.07.02
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수거구분 조회 정보 변경 시 이벤트
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fValueChangedInfectRdo(pParam){
- switch(pParam){
- case "a":
- group3.grp_sea.caption2.visible = true; //조회일자 caption
- group3.grp_sea.ipt_fromdd.visible = true; //from 일자
- group3.grp_sea.caption7.visible = true; //~ caption
- group3.grp_sea.ipt_todd.visible = true; //to 일자
- group3.btn_print.visible = false; //출력버튼
- group3.btn_cncl.visible = false; //수거취소버튼
- break;
- case "b":
- group3.grp_sea.caption2.visible = true; //조회일자 caption
- group3.grp_sea.ipt_fromdd.visible = true; //from 일자
- group3.grp_sea.caption7.visible = false; //~ caption
- group3.grp_sea.ipt_todd.visible = false; //to 일자
- group3.btn_print.visible = true; //출력버튼
- group3.btn_cncl.visible = true; //수거취소버튼
- break;
- case "c":
- group3.grp_sea.caption2.visible = false; //조회일자 caption
- group3.grp_sea.ipt_fromdd.visible = false; //from 일자
- group3.grp_sea.caption7.visible = false; //~ caption
- group3.grp_sea.ipt_todd.visible = false; //to 일자
- group3.btn_print.visible = true; //출력버튼
- group3.btn_cncl.visible = false; //수거취소버튼
- break;
- }
- }
- /**
- * @group :
- * @ver : 2009.01.29
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수거취소 버튼 이벤트
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCncl(){
- if(ds_main_extinfo_extlist.findRow("chk", "1") < 1){
- sysf_messageBox("수거 취소할 내역을 선택하십시요.","I");
- return;
- }
-
- ds_send_reqdata.clearData();
-
- ds_send_reqdata.enableevent = false;
- ds_send_reqdata.updatecontrol = false;
-
- for( var i=0 ; i<ds_main_extinfo_extlist.rowcount ; i++ ){
- var nRow = ds_send_reqdata.addRow();
- ds_send_reqdata.copyRow(nRow, ds_main_extinfo_extlist, i);
- ds_send_reqdata.setRowType(nRow, "u");
-
- if( ds_send_reqdata.getColumn(nRow, "chk") == "1" ){
- ds_send_reqdata.setColumn(nRow, "chk", "Y");
- }
- }
-
- ds_send_reqdata.updatecontrol = true;
- ds_send_reqdata.enableevent = true;
-
- grdf_setStatusColumn(ds_send_reqdata, "status");
-
- var oParam = {};
- oParam.id = "TXAVT00131";
- oParam.service = "tissuebankapp.TissueBankProcess";
- oParam.method = "reqSetAvtTbeoInfoList";
- oParam.inds = "reqdata=ds_send_reqdata";
- //oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_TXAVT00131";
- tranf_submit(oParam);
- }
- function cf_TXAVT00131(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0){
- sysf_messageBox('적출물정보 수정을', 'E009');
- return;
- }
-
- fSearch();
- }]]></Script>
|