123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fInitialize(){
-
- model.removeNodeset("/root/main/unpreplist");
- //미비과 조회
- // zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/hidden/deptlist", "depthngnm", "asc");
-
- /*
- zbcfGetDeptCodeList("012", "orduseyn", "D", "/root/hidden/deptlist", "depthngnm", "asc");
- addComboItem("cmb_deptcd","전체","-");
- var fDate = getCurrentDate();
- var fgetdd = fDate.toDate();
- var isDate = fgetdd.getAddDate(-1);
- model.setValue("/root/main/condition/fromdd",isDate.getDateFormat());
- model.setValue("/root/main/condition/todd", getCurrentDate());
- */
- fDocInfoSetting(); //로그인한 미비의사id적용
- model.refresh();
- }
- /**
- * @desc : 미비 리스트 조회
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSrchUnprepList()
- {
- model.copyNode("/root/send" , "/root/main/condition");
- submit("TRMRI02701");
- }
- /**
- * @desc : 엑셀로 저장
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- func
- function fSaveExcel(){
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != "")
- {
- grd_unpreplist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
- }
- }
-
- /**
- * @desc : 사용자 정보 얻기
- * @id :
- * @event : xforms-select
- * @return : void
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetUserInfo(userid,usernm,deptcd ,instcd){
- model.makeValue("/root/temp/userinfo/userid", userid);
- model.makeValue("/root/temp/userinfo/usernm", usernm.getTrim());
- model.makeValue("/root/temp/userinfo/deptcd", deptcd);
- model.makeValue("/root/temp/userinfo/instcd", instcd);
- }
- /**
- * @---------------------------------------------------
- * @desc : 문자열 앞뒤에있는 공백 제거
- * @param : N/A
- * @return : 공백을 제거한 결과 문자열
- * @---------------------------------------------------
- */
- String.prototype.getTrim = function()
- {
- var startPoint = 0; // subString 하기 위한 시작 포인트
- var endPoint = this.length; // subString 하기 위한 끝 포인트
- //문자열앞에 공백문자가 들어 있는 Index 추출
- while( (startPoint < endPoint) && (this.charCodeAt(startPoint) == 32) )
- {
- startPoint++;
- }
- //문자열뒤에 공백문자가 들어 있는 Index 추출
- while( (startPoint < endPoint) && (this.charCodeAt(endPoint-1) == 32) )
- {
- endPoint--;
- }
- // 공백을 제거했으면 subString하여 결과문자열을 리턴하고 제거한 내용이 없으면 그대로 리턴
- return ( (startPoint > 0) || (endPoint < this.length) ) ? this.substring(startPoint, endPoint) : this;
- }
-
- /**
- * @desc : 기록지에 setParameter
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetParamFormRec(){
-
- var curRow = grd_unpreplist.row - grd_unpreplist.fixedRows + 1;
- if(curRow < 1){
- return;
- }
-
- var pid = model.getValue("/root/main/unpreplist["+ curRow +"]/pid");
- var orddd = model.getValue("/root/main/unpreplist["+ curRow +"]/orddd");
- var cretno = model.getValue("/root/main/unpreplist["+ curRow +"]/cretno");
- var ioflag = model.getValue("/root/main/unpreplist["+ curRow +"]/indschflag");
- var orddrid = model.getValue("/root/main/unpreplist["+ curRow +"]/unprepdrid");
- var formcd = model.getValue("/root/main/unpreplist["+ curRow +"]/formcd");
- var orddeptcd = model.getValue("/root/main/unpreplist["+ curRow +"]/indschdeptcd");
- var formrecseq = model.getValue("/root/main/unpreplist["+ curRow +"]/formrecseq");
- var formrecdd = model.getValue("/root/main/unpreplist["+ curRow +"]/formrecdd");
- var dschdd = model.getValue("/root/main/unpreplist["+ curRow +"]/dschdd");
- //var dschdd = "20080201";
-
- /* 2월 1일부터 적용
- var sDate = 20080202;
- if(Number(dschdd) < sDate ){
- messageBox("종이기록으로 작성하시어 의료정보팀으로 내려주세요. 종이기록으로 작성하셔야하는 환자", "E008");
- return;
- }*/
- setParameter("pid", pid);
- setParameter("orddd", orddd);
- setParameter("cretno", cretno);
- setParameter("ioflag", ioflag);
- setParameter("orddeptcd", orddeptcd);
- setParameter("orddrid", orddrid);
- setParameter("SSMMR01100_formrecdd", formrecdd);
- if(formrecseq == "" || formrecseq == 0){
- setParameter("openmode", "newform"); //오픈모드는 “recform”
- setParameter("formcd", formcd);
- }else{
- setParameter("openmode", "recform"); //오픈모드는 "recform"
- setParameter("formrecseq", formrecseq); //서식기록테이블의 formrecseq(기록순번)
- }
- modal("SSMMR01100", 1, 0, 0 ,"", "", "");
-
- //기록순번
- var sFormRecSeq = getParameter("SSMMR01100_formrecseq");
- var currentDt = getCurrentDate()+getCurrentTime();
-
- //alert("currow->"+curRow +"=sFormRecSeq="+sFormRecSeq);
- if (sFormRecSeq != "")
- {
- model.setValue("/root/main/unpreplist["+ curRow +"]/formrecseq", sFormRecSeq);
- model.setValue("/root/main/unpreplist["+ curRow +"]/statcert", "2");
- model.setValue("/root/main/unpreplist["+ curRow +"]/drcnfmdt", currentDt.substring(0, 14)); //의사확인일시
- model.setValue("/root/main/unpreplist["+ curRow +"]/drflag", "drflag"); //의사확인일시구분
- grd_unpreplist.rowStatus(curRow) = 2;
- // 저장
- fSetUnprepRec();
- }
- model.refresh();
- clearParameter("SSMMR01100_formrecseq");
- }
- /**
- * @desc : 출력기능
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fPrintBtn(){
-
-
- exeReportPreview("RPMRI01800", "XMLSTR");
- //exeReportPreview("RPMRI01800", "XMLSTR", "", "", "true", "", "", "", "", "true");
- }
- /**
- * @desc : 의사정보 셋팅
- * @
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fDocInfoSetting(){
- //alert(1);
- if(getUserInfo("jobkindcd") == "0330" ){
- //if((getUserInfo("jobkindcd") == "0330") || (getUserInfo("jobkindcd") == "0332")){
- //alert(2);
- model.setValue("/root/main/condition/drnm", getUserInfo("usernm"));
- model.setValue("/root/main/condition/drid", getUserInfo("userid"));
- model.refresh();
- }
- }
|