123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- /* SAPS 상세 관련
- 개발자:이윤주 */
- function fIni()
- {
- var pid = opener.window.javascript.getParameter("SMMMR04002_pid");
- var hngnm = opener.window.javascript.getParameter("SMMMR04002_hngnm");
- var orddd = opener.window.javascript.getParameter("SMMMR04002_orddd");
- var cretno = opener.window.javascript.getParameter("SMMMR04002_cretno");
- var fromdd = opener.window.javascript.getParameter("SMMMR04002_fromdd");
- var ipsildt = opener.window.javascript.getParameter("SMMMR04002_ipsildt");
-
- var recflag = "DI02";
-
- model.makeValue("/root/init/pid",pid);
- model.makeValue("/root/init/hngnm",hngnm);
- model.makeValue("/root/init/orddd",orddd);
- model.makeValue("/root/init/cretno",cretno);
- model.makeValue("/root/init/fromdd",fromdd);
- model.makeValue("/root/init/recflag",recflag);
- model.makeValue("/root/init/ipsildt",ipsildt);
-
-
- fSearch();
-
- }
- function fSearch()
- {
-
- model.makeValue("/root/cond/search/pid",model.getValue("/root/init/pid"));
- model.makeValue("/root/cond/search/orddd",model.getValue("/root/init/orddd"));
- model.makeValue("/root/cond/search/fromdd",model.getValue("/root/init/fromdd"));
- model.makeValue("/root/cond/search/cretno",model.getValue("/root/init/cretno"));
- model.makeValue("/root/cond/search/recflag",model.getValue("/root/init/recflag"));
- model.makeValue("/root/cond/search/ipsildt",model.getValue("/root/init/ipsildt"));
- model.makeValue("/root/cond/search/chosflag","Z");
-
- submit("TRMMR04003");
-
- model.makeValue("/root/init/sapsscore",model.getValue("/root/main/detlinfo/formdetl/sapsscore"));
- model.makeValue("/root/init/pom",model.getValue("/root/main/detlinfo/formdetl/pom"));
-
- model.refresh();
- }
- function fGetData()
- {
-
- if (submit("TRMMR04004")) {
- model.makeValue("/root/init/sapsscore","");
- model.makeValue("/root/init/pom","");
- }
-
- model.refresh();
- }
- function fSave()
- {
- if (fSaveChk() == false) {
- return;
- }
-
- //점수계산
- fCalc();
-
- if (submit("TXMMR04002")) {
- var cnt = model.getValue("/root/hidden/savedetl/rslt/cnt");
- fSearch();
- if ( cnt > 0) {
- messageBox("정상적으로 저장되었습니다","I");
- }
- }
- }
- function fDel()
- {
- if ( 6 != messageBox("삭제 하시겠습니까","Q") ) {
- return;
- }
-
- model.makeValue("/root/cond/del/pid",model.getValue("/root/init/pid"));
- model.makeValue("/root/cond/del/orddd",model.getValue("/root/init/orddd"));
- model.makeValue("/root/cond/del/fromdd",model.getValue("/root/init/fromdd"));
- model.makeValue("/root/cond/del/cretno",model.getValue("/root/init/cretno"));
- model.makeValue("/root/cond/del/recflag",model.getValue("/root/init/recflag"));
-
- if (submit("TXMMR04003")) {
- var cnt = model.getValue("/root/hidden/savedetl/rslt/cnt");
- fSearch();
- if ( cnt > 0) {
- messageBox("정상적으로 삭제되었습니다","I");
- }
- }
- }
- function fSaveChk() {
-
- var cnt = getNodeSetCnt("/root/main/detlinfo/formdetl");
-
- for ( var i = 1; i<= cnt ; i++) {
- var itemval = model.getValue("/root/main/detlinfo/formdetl["+i+"]/itemval1");
- var itemcd = model.getValue("/root/main/detlinfo/formdetl["+i+"]/itemcd");
-
- if (itemval == "") {
- var headnm = model.getValue("/root/main/detlinfo/formdetl["+i+"]/headnm");
- messageBox("["+ headnm + "]값이 입력되지 않았습니다","I");
- return false;
- }
- }
- return true;
- }
- function fCalc(){
-
- var cnt = getNodeSetCnt("/root/main/detlinfo/formdetl");
-
- for ( var i = 1; i<= cnt ; i++) {
- var itemval = model.getValue("/root/main/detlinfo/formdetl["+i+"]/itemval1");
- var itemcd = model.getValue("/root/main/detlinfo/formdetl["+i+"]/itemcd");
-
- if (itemcd == "DI020005") {
- itemval = 0;
- }
-
- if (itemcd == "DI020015") {
- itemval = parseInt(itemval.substr(0,2));
- }
-
- if (itemcd == "DI020017") {
- itemval = parseInt(itemval.substr(1,1));
- }
-
- model.setValue("/root/main/detlinfo/formdetl["+i+"]/score",itemval);
- //model.makeValue("/root/main/sinfo/slist["+i+"]/score",itemval);
-
- }
-
- //예외처리
- var score15 = model.getValue("/root/main/detlinfo/formdetl[itemcd='DI020015']/score");
- var score18 = model.getValue("/root/main/detlinfo/formdetl[itemcd='DI020018']/score");
-
- if ( score15 == "-5" && score18 == "-4" ) {
- model.setValue("/root/main/detlinfo/formdetl[itemcd='DI020015']/score","0");
- model.setValue("/root/main/detlinfo/formdetl[itemcd='DI020018']/score","-4");
- }
-
- var score = 0;
- var scoreboard = "";
- var tmp = "";
- for ( var i = 1; i<= cnt ; i++) {
- tmp = model.getValue("/root/main/detlinfo/formdetl["+i+"]/score")
- score = score + parseInt(tmp);
- scoreboard = scoreboard + model.getValue("/root/main/detlinfo/formdetl["+i+"]/headnm")+":"+tmp+"\n" ;
- }
-
- model.setValue("/root/main/detlinfo/formdetl/sapsscore",score);
- model.setValue("/root/init/scoreboard",scoreboard);
- }
- function fPrint() {
- model.removenodeset("/root/main/report/detlinfo");
- model.makeNode("/root/main/report/detlinfo");
-
- //Box 1
- //var DI020001 = model.getValue("/root/main/detlinfo/formdetl[itemcd='DI020001']/itemval1"); //나이
- var DI020001 = combo2.label; //나이
- var DI020002 = combo29.label; //중환자실 입실 전 병실 입원 기간
- var DI020003 = combo30.label;; //중환자실 입실 전 체류한 곳
- var DI020004 = combo10.label; //암 치료 여부
- var DI020005 = combo3.label; //고형암 환자 여부
- var DI020007 = combo8.label; //혈액암 여부
- var DI020006 = combo1.label; //전이암 여부
- var DI020008 = combo4.label; //Chronic HF(NYHA IV) 여부
- var DI020009 = combo7.label; //Cirrhosis 여부
- var DI020010 = combo6.label; //AIDS 여부
- var DI020011 = combo5.label; //vasoactive dugs 사용(ex. dopamine, dobutamine, adrenaline or noradrenaline)
-
- //Box 2
- var DI020014 = combo12.label; //입원여부
- var DI020013 = combo11.label; //수술여부
- var DI020012 = combo9.label; //계획된 입원
- var DI020019 = combo17.label; //Anatomical site of surgery
- var DI020015 = combo13.label; //Cardiovascular
- var DI020016 = combo14.label; //Hepatic
- var DI020017 = combo15.label; //Digestive
- var DI020018 = combo16.label; //Neurologic
- var DI020020 = combo31.label; //Nosocomial infection(hospital-acquired)
- var DI020021 = combo18.label; //Respiratory infection
-
- //Box 3
- var DI020022 = combo19.label; //Glasgow coma Scale(GCS) (lowest)(points)
- var DI020030 = combo27.label; //Systolic blood pressure (lowest)
- var DI020026 = combo23.label; //Heart rate (highest)(beats/minute)
- var DI020024 = combo21.label; //Body temperature (highest)(℃)
- var DI020031 = combo28.label; //Oxygenation
- var DI020025 = combo22.label; //Serum Creatinine (highest)(mg/dl)
- var DI020023 = combo20.label; //Total bilirubin (highest)(mg/㎗)
- var DI020027 = combo24.label; //WBC (highest)(g/ℓ)
- var DI020029 = combo26.label; //Platelets (lowest)(mmHg)
- var DI020028 = combo25.label; //PH (lowest)
-
- var DI020032 = input5.value; //SAPS 점수
- var DI020033 = input6.value; //예측사망율(%)
-
-
- model.makeValue("/root/main/report/detlinfo/pid",model.getValue("/root/init/pid"));
- model.makeValue("/root/main/report/detlinfo/hngnm",model.getValue("/root/init/hngnm"));
- model.makeValue("/root/main/report/detlinfo/orddd",model.getValue("/root/init/orddd"));
- model.makeValue("/root/main/report/detlinfo/ipsildt",model.getValue("/root/init/ipsildt"));
- //Box 1
- model.makeValue("/root/main/report/detlinfo/DI020001",DI020001);
- model.makeValue("/root/main/report/detlinfo/DI020002",DI020002);
- model.makeValue("/root/main/report/detlinfo/DI020003",DI020003);
- model.makeValue("/root/main/report/detlinfo/DI020004",DI020004);
- model.makeValue("/root/main/report/detlinfo/DI020005",DI020005);
- model.makeValue("/root/main/report/detlinfo/DI020007",DI020007);
- model.makeValue("/root/main/report/detlinfo/DI020006",DI020006);
- model.makeValue("/root/main/report/detlinfo/DI020008",DI020008);
- model.makeValue("/root/main/report/detlinfo/DI020009",DI020009);
- model.makeValue("/root/main/report/detlinfo/DI020010",DI020010);
- model.makeValue("/root/main/report/detlinfo/DI020011",DI020011);
-
- //Box 2
- model.makeValue("/root/main/report/detlinfo/DI020014",DI020014);
- model.makeValue("/root/main/report/detlinfo/DI020013",DI020013);
- model.makeValue("/root/main/report/detlinfo/DI020012",DI020012);
- model.makeValue("/root/main/report/detlinfo/DI020019",DI020019);
- model.makeValue("/root/main/report/detlinfo/DI020015",DI020015);
- model.makeValue("/root/main/report/detlinfo/DI020016",DI020016);
- model.makeValue("/root/main/report/detlinfo/DI020017",DI020017);
- model.makeValue("/root/main/report/detlinfo/DI020018",DI020018);
- model.makeValue("/root/main/report/detlinfo/DI020020",DI020020);
- model.makeValue("/root/main/report/detlinfo/DI020021",DI020021);
-
-
- //Box 3
- model.makeValue("/root/main/report/detlinfo/DI020022",DI020022);
- model.makeValue("/root/main/report/detlinfo/DI020030",DI020030);
- model.makeValue("/root/main/report/detlinfo/DI020026",DI020026);
- model.makeValue("/root/main/report/detlinfo/DI020024",DI020024);
- model.makeValue("/root/main/report/detlinfo/DI020031",DI020031);
- model.makeValue("/root/main/report/detlinfo/DI020025",DI020025);
- model.makeValue("/root/main/report/detlinfo/DI020023",DI020023);
- model.makeValue("/root/main/report/detlinfo/DI020027",DI020027);
- model.makeValue("/root/main/report/detlinfo/DI020029",DI020029);
- model.makeValue("/root/main/report/detlinfo/DI020028",DI020028);
- model.makeValue("/root/main/report/detlinfo/DI020032",DI020032);
- model.makeValue("/root/main/report/detlinfo/DI020033",DI020033);
-
- //copyNodeType("/root/main/report/detlinfo", "/root/main/detlinfo/formdetl", "after");
- //copyNodesetType("/root/main/report/detlinfo", "/root/main/detlinfo/formdetl", "after");
-
-
- //출력
- exeReportPreview("RMMMR04002", "XMLSTR", "/root/main/report/detlinfo");
-
- }
|