123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 간암 환자관리 ( SPMMR08100간암.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- function fInitialize(){
- model.toggle("case1");
- // 화면 열리면서 모든 환자를 로딩(recflag:3 간질환 환자)
- //model.makeValue("root/send/reqdata/recflag", "3");
- model.makeValue("root/send/search/recflag", "3");
- //submit("TRMMR08100");
- model.setValue("/root/send/search/sdate", getCurrentDate());
- model.setValue("/root/send/search/tdate", getCurrentDate());
- model.setValue("/root/send/search/ioflag", "O");
- model.refresh();
- }
- // 환자목록에서 더블 클릭시 환자 정보를 가져와서 상세보기에 뿌려줌
- function fDetailPat(){
- if(grd_liver.isCell(event.target) && grd_liver.mouserow >= grd_liver.fixedrows){
- var pid = grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("pid"));
- if(pid!=""){
- model.removeNode("/root/patdetail");
- model.makeValue("/root/send/reqdata/pid", pid);
- submit("TRMMR08103");
- model.makeValue("/root/patdetail/comments", grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("comments")));
- btn_sw2.selected=true;
- model.toggle("case2");
- model.refresh();
- }
- }
- }
- //그리드 늘리기
- var grd_status;
- function fExpandGrid(){
- var grd_name=getParameter("grd_name");
- if(grd_name=="grd_testresult1" && grd_testresult1.row >= grd_testresult1.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 125;
- grd_testresult2.attribute("top") = 125;
- grd_testresult2.attribute("height") = 0;
- grd_testresult3.attribute("top") = 170;
- grd_testresult3.attribute("height") = 0;
- grd_status="grd_testresult1"; //현재 상태값을 설정
- }else if(grd_name=="grd_testresult2" && grd_testresult2.row >= grd_testresult2.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 0;
- grd_testresult2.attribute("top") = 0;
- grd_testresult2.attribute("height") = 125;
- grd_testresult3.attribute("top") = 0;
- grd_testresult3.attribute("height") = 0;
- grd_status="grd_testresult2";
- }else if(grd_name=="grd_testresult3" && grd_testresult3.row >= grd_testresult3.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 0;
- grd_testresult2.attribute("top") = 0;
- grd_testresult2.attribute("height") = 0;
- grd_testresult3.attribute("top") = 0;
- grd_testresult3.attribute("height") = 125
- grd_status="grd_testresult3";
- }
- }
- //그리드 줄이기
- function fShortenGrid(){
- var grd_name=getParameter("grd_name");
- if(grd_status==grd_name && grd_name=="grd_testresult1" && grd_testresult1.row >= grd_testresult1.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 45;
- grd_testresult2.attribute("top") = 45;
- grd_testresult2.attribute("height") = 45;
- grd_testresult3.attribute("top") = 90;
- grd_testresult3.attribute("height") = 45;
- }else if(grd_status==grd_name && grd_name=="grd_testresult2" && grd_testresult2.row >= grd_testresult2.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 45;
- grd_testresult2.attribute("top") = 45;
- grd_testresult2.attribute("height") = 45;
- grd_testresult3.attribute("top") = 90;
- grd_testresult3.attribute("height") = 45;
- }else if(grd_status==grd_name && grd_name=="grd_testresult3" && grd_testresult3.row >= grd_testresult3.fixedrows){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 45;
- grd_testresult2.attribute("top") = 45;
- grd_testresult2.attribute("height") = 45;
- grd_testresult3.attribute("top") = 90;
- grd_testresult3.attribute("height") = 45;
- }
- }
- //화면 초기화
- function fGrid_init(){
- grd_testresult1.attribute("top") = 0;
- grd_testresult1.attribute("height") = 45;
- grd_testresult2.attribute("top") = 45;
- grd_testresult2.attribute("height") = 45;
- grd_testresult3.attribute("top") = 90;
- grd_testresult3.attribute("height") = 45;
- }
- //투약관리 LMC 및 항암제LMC 저장하기
- function fSave(btn_nm){
- if(btn_nm=="btn_prcp"){
- var rowcnt=grd_prcpinfo.rows;
- var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
- var datastring="";
- for(i=1; i<rowcnt; i++){
- var lmc=grd_prcpinfo.valueMatrix(i, grd_prcpinfo.colRef("lmc"));
- datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
- model.getValue("/root/patdetail/patinfo/pid") +"▦" +
- model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
- model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
- model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
- "3▦" +
- model.getValue("/root/patdetail/prcpinfo["+i+"]/prcpcd") +"▦" +
- lmc +"▦" +
- getUserInfo("userid")+"▦" +
- getUserInfo("userid") +"▩";
- }
- model.removenode("/root/send/savedata");
- model.makeValue("/root/send/savedata", savedata + datastring);
- submit("TXMMO08102");
- }else if(btn_nm=="btn_anticancer"){
- var rowcnt=grd_anticancer.rows;
- var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
- var datastring="";
- for(i=1; i<rowcnt; i++){
- var lmc=grd_anticancer.valueMatrix(i, grd_anticancer.colRef("lmc"));
- datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
- model.getValue("/root/patdetail/patinfo/pid") +"▦" +
- model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
- model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
- model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
- "3▦" +
- model.getValue("/root/patdetail/anticancerinfo["+i+"]/prcpcd") +"▦" +
- lmc +"▦" +
- getUserInfo("userid")+"▦" +
- getUserInfo("userid") +"▩";
- }
- model.removenode("/root/send/savedata");
- model.makeValue("/root/send/savedata", savedata + datastring);
- submit("TXMMO08102");
- }else if(btn_nm=="btn_comment"){
- var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
- var datastring="";
- if(model.getValue("/root/patdetail/comments")!=""){
- datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
- model.getValue("/root/patdetail/patinfo/pid") +"▦" +
- model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
- model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
- model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
- "3▦" +
- "comments" +"▦" +
- model.getValue("/root/patdetail/comments") +"▦" +
- getUserInfo("userid")+"▦" +
- getUserInfo("userid") +"▩";
- }
- model.removenode("/root/send/savedata");
- model.makeValue("/root/send/savedata", savedata + datastring);
- submit("TXMMO08102");
- }
- }
- //환자삭제하기
- function fdeletepat(){
- if(grd_liver.row >= grd_liver.fixedrows){
- var chk=messageBox("해당 환자를 삭제하시겠습니까? ", "S001", ""); //예:6 아니오:7 취소:2
- if(chk=="6"){
- var pid=grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("pid"));
- model.removeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/recflag", 3);
- model.makeValue("/root/send/reqdata/lastupdtrid", getUserInfo("userid"));
- submit("TXMMO08103");
- model.removeNode("/root/patdetail");
- fInitialize();
- }
- }
- }
-
- //검색조건 체크
- function fCheck(){
- var pid=model.getValue("/root/send/search/pid");
- var ioflag=model.getValue("/root/send/search/ioflag");
- var mdiag=model.getValue("/root/send/search/mdiag");
- var sdiag=model.getValue("/root/send/search/sdiag");
- var sdate=model.getValue("/root/send/search/sdate");
- var tdate=model.getValue("/root/send/search/tdate");
- if(pid=="" && ioflag=="" && mdiag=="" && sdiag=="" && sdate=="" && tdate==""){
- return true;
- }else if(sdate !="" && tdate =="" || sdate =="" && tdate !=""){
- return true;
- }else{
- return false;
- }
- }
|