123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- /*
- 중환자실회복환자관리(SMMNP00730.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xPatListPath = "/root/main/patinfo/patlist";
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- //인스턴스초기화
- model.removenode('/root/send');
- model.removenode('/root/hidden');
- model.removenode('/root/main/patinfo');
- model.removenode('/root/cond');
- model.makenode('/root/send');
- model.makenode('/root/hidden');
- model.makenode('/root/main/patinfo');
- model.makenode('/root/cond/wardcd');
- model.makenode('/root/cond/fromdd');
- model.makenode('/root/cond/todd');
- model.makenode('/root/cond/rdocond');
- model.makeValue("/root/send/reqdata/cdgrupid", "094");
- model.makeValue("/root/send/reqdata/cdid", "");
- model.makeValue("/root/send/reqdata/supcdid", "");
- submit("TRMNP04903");
- addComboItem("cmb_spcl", "전 체", "", "above" );
- //조회조건 초기화
- model.setValue('/root/cond/fromdd', getCurrentDate());
- model.setValue('/root/cond/todd', getCurrentDate());
- model.setValue('/root/cond/rdocond', '1');
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 회복환자조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- var wardcd = model.getValue('/root/cond/wardcd');
- var fromdd = model.getValue('/root/cond/fromdd');
- var todd = model.getValue('/root/cond/todd');
- var rdocond = model.getValue('/root/cond/rdocond');
- if(fromdd == null || fromdd == ''){
- fromdd = getCurrentDate();
- }
- if(todd == null || todd == ''){
- todd = getCurrentDate();
- }
- model.setValue('/root/cond/fromdd', fromdd);
- model.setValue('/root/cond/todd', todd);
- model.removenode('/root/send/reqdata');
- model.makeValue('/root/send/reqdata/wardcd', wardcd);
- model.makeValue('/root/send/reqdata/fromdd', fromdd);
- model.makeValue('/root/send/reqdata/todd', todd);
- model.makeValue('/root/send/reqdata/rdocond', rdocond);
- if(!submit('TRMNP00731')){
- messageBox('회복환자조회를', 'E009');
- return;
- }
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Excel파일로 저장
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(file != "") {
- grd_patlist.saveExcel(file);
- }
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 회복환자 중환자실 퇴실시간 수정
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
- if(fIsValid()){
- model.removenode('/root/send');
- model.makeValue('/root/send/reqdata', grd_patlist.getUpdateDataAll('i'));
- if(!submit('TXMNP00731')){
- messageBox('회복환자 퇴실시간저장을', 'E009');
- return;
- }else{
- fSearch();
- }
- }
- }
- /**
- * @group :
- * @ver : 2008.07.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 회복환자 중환자실 퇴실시간 수정하기전 유효성체크
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIsValid(){
- var outdd, outtm;
- var isNull;//그리드에 전부다 입력 안됐을때 저장 막아준다.
- for(var i = 1; i <= grd_patlist.rows; i++){
- outdd = model.getValue('/root/main/patinfo/patlist[' + i + ']/icuoutroomdd');
- outtm = model.getValue('/root/main/patinfo/patlist[' + i + ']/icuoutroomtm');
- //퇴실일자만 입력되고 시간이 입력되지 않았을때
- if(outdd != null && outdd != ''){
- if(outdd.length != 8){
- messageBox(i + '번째의 환자의 퇴실일자를 날짜형식((예)2008-01-01)에 맞게', 'C001');
- return false;
- }
- if(outtm == null || outtm == ''){
- messageBox(i + '번째의 환자의 퇴실시간을', 'C001');
- return false;
- }else if(outtm.length != 4){
- messageBox(i + '번째의 환자의 퇴실시간을 시간형식((예)12:00)에 맞게', 'C001');
- return false;
- }
- isNull = false;
- }
- //퇴실시간만 입력되고 일자가 입력되지 않았을때
- if(outtm != null && outtm != ''){
- if(outtm.length != 4){
- messageBox(i + '번째의 환자의 퇴실시간을 시간형식((예)12:00)에 맞게', 'C001');
- return false;
- }
- if(outdd == null || outdd == ''){
- messageBox(i + '번째의 환자의 퇴실일자를', 'C001');
- return false;
- }else if(outdd.length != 8){
- messageBox(i + '번째의 환자의 퇴실일자를 날짜형식((예)2008-01-01)에 맞게', 'C001');
- return false;
- }
- isNull = false;
- }
- }
- //그리드에 입력된 퇴실시간, 퇴실일자가 없다.
- if(isNull){
- return false;
- }
- return true;
- }
|