123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- /**
- * @desc : 화면초기화
- *
- * @param :
- * @return :
- * @author : 경북대학교
- * @---------------------------------------------------
- */
- //서식코드 전역변수
- var gFormcd = "";
- function fIni(){
- //fSetpos(iviewer10);
- }
- function fGetMenuParam()
- {
- var screen_kind = parent.window.javascript.getScreenMenuParameter();
- return screen_kind;
- }
-
- function fSelectPat(patinfo)
- {
- //초기화
- parent.window.javascript.fSetSavetitle("");
-
- fiviewSize("normal");
-
- patinfo = patinfo.split("▦");
-
- var pid = patinfo[0];
- var orddd = patinfo[1];
- var cretno = patinfo[2];
- var orddrid = patinfo[3];
- var ioflag = patinfo[4];
- var orddeptcd = patinfo[5];
- var patnm = patinfo[6];
- var recflag = patinfo[7];
-
- //환자정보 우측상단에
- model.setValue("/root/init/patinfo", pid + " " + patnm);
-
- var formrecseq = 0;
- var formcd = "";
- var ivw_loader ;
- var nodeSetcnt ;
- var btn ;
-
- if ( recflag == "A") {
- nodeSetcnt = mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/formcd", 5617);
- }
- else if ( recflag == "B" ) {
- nodeSetcnt = mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/formcd", 5618);
- }
- else if ( recflag == "C" ) {
- nodeSetcnt = mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/formcd", 5619);
- }
- else if ( recflag == "D" ) {
- nodeSetcnt = mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/formcd", 5620);
- }
- else if ( recflag == "E" ) {
- nodeSetcnt = mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/formcd", 5621);
- }
-
- nodeSetcnt = getNodesetCount("/root/temp/formcd/hardcd");
-
- for (var i = 1; i <= nodeSetcnt; i++)
- {
- model.makeValue("/root/send/reqdata/pid",pid);
- model.makeValue("/root/send/reqdata/orddd",orddd);
- model.makeValue("/root/send/reqdata/cretno",cretno);
- model.makeValue("/root/send/reqdata/recflag",recflag);
- model.makeValue("/root/send/reqdata/chosflag",ioflag);
- model.makeValue("/root/send/reqdata/orddeptcd",orddeptcd);
- model.makeValue("/root/send/reqdata/orddrid",orddrid);
- model.makeValue("/root/send/reqdata/cdseqno",i);
-
- submit("TRMRH00120");
-
- formrecseq = model.getValue("/root/result/recinfo/formrecseq");
- formcd = model.getValue("/root/result/recinfo/formcd");
-
- ivw_loader = document.all("iviewer"+i*10);
- ivw_loader.src = "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
- btn = document.all("btn_sw"+i);
- cap = document.all("cap"+i*10);
-
- fSetpos(ivw_loader);
- cap.attribute("height") ="20";
- cap.attribute("width") ="635";
- cap.attribute("left") ="0";
- cap.attribute("top") ="700";
-
- btn.attribute("visibility") = "visible";
- btn.attribute("text") = model.getValue("/root/temp/formcd/hardcd["+i+"]/hardcdnm");
-
- if (formrecseq == "") {
- fNewForm(ivw_loader,formcd,pid,orddd,cretno,ioflag,orddeptcd,orddrid);
- }
- else {
- fRecForm(ivw_loader,formrecseq);
- }
-
- }
-
- model.refresh();
- model.toggle("case1");
- btn_sw1.selected = true;
- fGetSaveTitle(iviewer10);
- }
- function fNewForm(ivw_loader,formcd,pid,orddd,cretno,ioflag,orddeptcd,orddrid) {
- ivw_loader.window.javascript.fSetPamInfo(pid, orddd.substring(0, 8), cretno, ioflag , orddeptcd, orddrid);
- ivw_loader.window.javascript.fLoadNewForm(formcd, false);
- }
-
- function fRecForm(ivw_loader,formrecseq) {
- ivw_loader.window.javascript.fLoadRecForm(formrecseq, false);
- ivw_loader.grup_btn.disabled = false;
- }
- function fPrnt() {
- messageBox("준비중입니다","I999");
- return;
- }
- function fSave(kind){
- var indx = (switch1.selectedIndex + 1) * 10 ;
- var ivw_loader = document.all("iviewer"+indx);
-
- if (indx == 0) {
- return;
- }
-
- if (kind == "T"){
- ivw_loader.btn_tmpsave.dispatch("onclick");
- fGetSaveTitle(ivw_loader);
- }
- else if (kind == "S") {
- ivw_loader.btn_signsave.dispatch("onclick");
- fGetSaveTitle(ivw_loader);
- }
- else if (kind == "D") {
- ivw_loader.btn_del.dispatch("onclick");
- var pid = ivw_loader.model.getValue("/root/main/recinfo/formrec/pid");
- var formcd = ivw_loader.model.getValue("/root/main/recinfo/formrec/formcd");
- var orddd = ivw_loader.model.getValue("/root/main/recinfo/formrec/orddd");
- var cretno = ivw_loader.model.getValue("/root/main/recinfo/formrec/cretno");
- var ioflag = ivw_loader.model.getValue("/root/main/recinfo/formrec/chosflag");
- var orddeptcd = ivw_loader.model.getValue("/root/main/recinfo/formrec/orddeptcd");
- var orddrid = ivw_loader.model.getValue("/root/main/recinfo/formrec/orddrid");
-
- var formrecseq =ivw_loader.window.javascript.fGetFormRec("formrecseq");
-
- if ( formrecseq == "") {
- return;
- }
- fNewForm(ivw_loader,formcd,pid,orddd,cretno,ioflag,orddeptcd,orddrid);
- fGetSaveTitle(ivw_loader);
- }
- else if (kind == "IB") {
- iviewer1.window.javascript.fSave(kind);
- }
- }
- function fSetpos(ivw_loader) {
-
- ivw_loader.attribute("height") ="715";
- ivw_loader.attribute("width") ="640";
- ivw_loader.attribute("left") ="0";
- ivw_loader.attribute("top") ="0";
-
- ivw_loader.ivw_base.attribute("height") ="713";
- ivw_loader.ivw_base.attribute("width") ="638";
- ivw_loader.ivw_base.attribute("left") ="0";
- ivw_loader.ivw_base.attribute("top") ="0";
-
- ivw_loader.grup_btn.attribute("top") ="665";
- ivw_loader.grup_btn.attribute("visibility") ="hidden";
- }
- function fGetSaveTitle(ivw_loader) {
-
- var formrecseq =ivw_loader.window.javascript.fGetFormRec("formrecseq")
-
- var title;
-
- if (formrecseq == "") {
- title ="";
- }
- else {
-
- var pid = ivw_loader.model.getValue("/root/main/recinfo/formrec/pid");
- var formcd = ivw_loader.model.getValue("/root/main/recinfo/formrec/formcd");
- var orddd = ivw_loader.model.getValue("/root/main/recinfo/formrec/orddd");
- var cretno = ivw_loader.model.getValue("/root/main/recinfo/formrec/cretno");
- var recflag = parent.window.javascript.getScreenMenuParameter();
- var cdseqno = switch1.selectedIndex + 1;
-
- model.makeValue("/root/send/reqdata/pid",pid);
- model.makeValue("/root/send/reqdata/orddd",orddd);
- model.makeValue("/root/send/reqdata/cretno",cretno);
- model.makeValue("/root/send/reqdata/recflag",recflag);
- model.makeValue("/root/send/reqdata/cdseqno",cdseqno);
-
- submit("TRMRH00120");
-
- var signyn = model.getValue("/root/result/recinfo/signyn");
- var fstrgstrnm = model.getValue("/root/result/recinfo/fstrgstrnm");
- var fstrgstdt = model.getValue("/root/result/recinfo/fstrgstdt");
- var lastrgstrnm = model.getValue("/root/result/recinfo/lastrgstrnm");
- var lastupdtdt = model.getValue("/root/result/recinfo/lastupdtdt");
-
- title = "최초:"+fstrgstrnm+"("+fstrgstdt+"),최종:"+lastrgstrnm+"("+lastupdtdt+")";
- }
-
- parent.window.javascript.fSetSavetitle(title);
- }
- // 아이뷰어의 크기 조절
- function fiviewSize(param){
-
- var nodeSetcnt = getNodesetCount("/root/temp/formcd/hardcd");
- var ivw_loader ;
-
- if(param=="expand"){
-
- iviewer1.attribute("width") = "430";
- switch1.attribute("left")="435px";
- switch1.attribute("width")="750px";
-
- for (var i = 1; i <= nodeSetcnt; i++)
- {
- ivw_loader = document.all("iviewer"+i*10);
- ivw_loader.attribute("width") ="740";
- ivw_loader.ivw_base.attribute("width") ="738";
- }
-
- }else if(param=="normal"){
-
- iviewer1.attribute("width") = "530";
- switch1.attribute("left")="535";
- switch1.attribute("width")="650";
-
- for (var i = 1; i <= nodeSetcnt; i++)
- {
- ivw_loader = document.all("iviewer"+i*10);
- ivw_loader.attribute("width") ="640";
- ivw_loader.ivw_base.attribute("width") ="638";
- }
- }
- }
|