1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048 |
- /*
-
- 심폐소생술(SMMNE02300.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
-
- xPathCardArrPatInfo = "/root/main/patinfo";
- xPathCardArrResusList = "/root/main/resusinfo/resuslist";
- /**
- * @group :
- * @ver : 2007.12.04
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 심폐소생술 보고서 초기 설정 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(pFlag){
- //상단 환자 정보 가져오기
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/paminfo", node);
-
- //현재 시간 세팅
- int_cardarrgenrdd.disabled = false;
- model.setValue(xPathCardArrPatInfo+"/cardarrgenrdd", getCurrentDate());
- model.setValue(xPathCardArrPatInfo+"/cardarrgenrtm", getCurrentTime());
- model.removeNode("/root/main/pathistinfo/pathistlist");
- var sJobKindCD = getUserInfo("jobkindcd"); // 직급코드
- var ssflag = "3";
-
- if(getUserInfo("dutplceinstcd") != '032' && getUserInfo("dutplceinstcd") != '031') { //경북대가 아니면
- if( sJobKindCD == "0330" || sJobKindCD == "0310"){
- ssflag = "1";
- }
- if( sJobKindCD == "1110" || sJobKindCD == "1140"){
- ssflag = "2";
- }
- } else if(getUserInfo("dutplceinstcd") == '032' || getUserInfo("dutplceinstcd") == '031') {
- //경북대이면 03%로 체크한다.
- if( sJobKindCD.substring(0, 2) == "03"){
- ssflag = "1";
- }
- if( sJobKindCD == "1140"){
- ssflag = "2";
- }
- }
- //의사, 간호사 직종 분류별 입력 창 제한 구분
- if(ssflag=="1"){ //의사
- model.setValue("/root/main/patinfo/nursdocflag", "D");
- group2.disabled = true ;
- } else if (ssflag=="2"){ //간호사
- model.setValue("/root/main/patinfo/nursdocflag", "N");
- fDateSetting("Init");
- } else { //기타
- group2.disabled = true ;
- chk_fstresusexecflag.disabled = true;
- int_fstresusexecetc.disabled = true;
- messageBox("심폐소생술보고서 작성 권한이 없습니다.","E");
- }
- submit("TRMNE02313");
-
- model.setValue("/root/send/wardcd", getUserInfo("dutplcecd") );
- submit("TRMNW00101");
-
- int_cardarrdiscvpsnetc.disabled = true;
- int_resusteamarvbfresusetc.disabled = true;
- int_resusteamfresusetc.disabled = true;
- int_resusendresnetc.disabled = true;
- cmb_cardarrgenrplcetestroom.disabled = true;
- int_cardarrgenrplceetcbigo.disabled = true;
- int_fstresusexecetc.disabled = true;
- int_cardarrgenrplcehosout.disabled = true;
- cmb_cardarrgenrplcehosin.disabled = true;
- cmb_cardarrgenrplceward.disabled = true;
- rdo_cardarrgenrplcewardflag.disabled = true;
- cmb_cardarrgenrplcehoscenter.disabled = true;
- int_dethdd.disabled = true;
- int_dethtm.disabled = true;
- button5.disabled = true;
- ipt_freairway1.disabled = true;
- ipt_freairway2.disabled = true;
- ipt_freairway3.disabled = true;
- ipt_freairway4.disabled = true;
- ipt_freairway5.disabled = true;
- ipt_freairway6.disabled = true;
-
- // 원외의 경우에만 병원 도착전 처치 활성화
- chk_hosparvbfresus.disabled = true;
- int_hosparvbfresusetc.disabled = true;
- bool_hosparvbfresusynflag.disabled = true;
-
- model.refresh();
-
-
- if(node != ""){
- model.setValue("/root/main/patinfo/pid", model.getValue("/root/main/paminfo/list/pid"));
- model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/paminfo/list/indd"));
- model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/paminfo/list/cretno"));
- model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/paminfo/list/instcd"));
- model.makeValue("/root/main/patinfo/wardcd", model.getValue("/root/main/paminfo/list/wardcd"));
- model.makeValue("/root/main/patinfo/roomcd", model.getValue("/root/main/paminfo/list/roomcd"));
- model.makeValue("/root/main/patinfo/ordtype", model.getValue("/root/main/paminfo/list/ioflag"));
- model.makeValue("/root/main/patinfo/medispclid", model.getValue("/root/main/paminfo/list/medispclid"));
- model.makeValue("/root/main/patinfo/atdoctcd", model.getValue("/root/main/paminfo/list/atdoctid"));
- model.makeValue("/root/main/patinfo/orddrid", model.getValue("/root/main/paminfo/list/orddrnm"));
- model.makeValue("/root/main/patinfo/deptcd", model.getValue("/root/main/paminfo/list/orddeptcd"));
- model.makeValue("/root/main/patinfo/orddeptcd", model.getValue("/root/main/paminfo/list/orddeptcd"));
- model.makeValue("/root/main/patinfo/age", model.getValue("/root/main/paminfo/list/age"));
- model.makeValue("/root/main/patinfo/gender", model.getValue("/root/main/paminfo/list/sex"));
- model.makeValue("/root/main/patinfo/patnm", model.getValue("/root/main/paminfo/list/hngnm"));
-
- if(model.getValue("/root/main/paminfo/list/ioflag") == "E") {
- model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/paminfo/list/erissdeptcd"));
- } else {
- model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/paminfo/list/wardcd"));
- }
-
- //주민등록 번호 셋팅
- var rrgstno = "";
-
- if(model.getValue("/root/main/paminfo/list/sex") == "M"){
- var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "1******";
- }else if(model.getValue("/root/main/paminfo/list/sex") == "F"){
- var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "2******";
- }else {
- var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "*******";
- }
-
- model.setValue("/root/main/patinfo/rrgstno", rrgstno);
- cmb_dept.dispatch("xforms-value-changed");
- //환자 정보 조회
- fSrchHistList(pFlag);
-
- //환자 정보 세팅
- model.setValue("/root/main/patinfo/patnm", model.getValue("/root/main/pathistinfo/patinfo/patnm" ));
- model.setValue("/root/main/patinfo/grdrage", model.getValue("/root/main/pathistinfo/patinfo/grdrage" ));
- model.setValue("/root/main/patinfo/cntctel", model.getValue("/root/main/pathistinfo/patinfo/cntctel" ));
- model.setValue("/root/main/patinfo/addr", model.getValue("/root/main/pathistinfo/patinfo/addr" ));
- model.setFocus("ipt_pid");
- model.refresh();
- }
- if( checkOpener() ){
- var param_pid = opener.javascript.getParameter("SMMNE04900_pid");
- var param_lastupdtdt = opener.javascript.getParameter("SMMNE04900_lastupdtdt");
-
- if(param_pid != ""){
- model.setValue("/root/main/patinfo/pid", param_pid);
- ipt_pid.refresh();
-
- event.keyCode = "13";
- ipt_pid.dispatch("onkeyup");
- for(i = 1; i < datagrid2.rows; i++){
- if( model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/lastupdtdt") == param_lastupdtdt ){
-
- model.setValue("/root/main/patinfo/selectrow", i);
- datagrid2.row = i;
- int_cardarrgenrdd.disabled = true;
-
- model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/indd"));
- model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/cretno"));
- model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/instcd"));
- model.setValue("/root/main/patinfo/cardarrgenrdd", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/cardarrgenrdd"));
- model.setValue("/root/main/patinfo/cardarrgenrtm", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/cardarrgenrtm"));
- model.setValue("/root/main/patinfo/histno", model.getValue("/root/main/pathistinfo/pathistlist["+i+"]/histno"));
-
- fCardArrResusSrch(1);
- fInputBoxInit();
- }
- }
- button4.visible = false; // 저장버튼 숨김.
- button10.visible = true;
- button11.visible = true;
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 대상 환자에 대한 심폐소생술 보고서 내용 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCardArrResusSave(pFlag, pFlag1, pStatus){
- var sRow = datagrid2.row;
- model.removeNode("/root/send");
- model.makeNode("/root/item/list");
- model.copyNode("/root/item/list", "/root/main/resusinfo");
-
- if(model.getValue("/root/main/patinfo/selectrow") == ""){
- if(pStatus == "U"){
- messageBox("수정할 데이터를 선택하지 않았습니다.","I");
- return;
- }
- if(pStatus == "D"){
- messageBox("삭제할 데이터를 선택하지 않았습니다.","I");
- return;
- }
- }
- // 저장/수정 제한 조건
- if(pFlag1 == "N" && pStatus != "D"){
- if( model.getValue(xPathCardArrResusList+"/cardarrgoalyn") == "" ){
- messageBox("심정지목격여부 항목이 입력되지 않았습니다.","E");
- return;
- }
-
- if( model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") == "" ){
- messageBox("심정지발견자 항목이 입력되지 않았습니다.","E");
- return;
- }
-
- // 병원내, 외 구분별 입력 수정 제한
- if(pFlag == 1){
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrfinddd") == "" || model.getValue("/root/main/resusinfo/resuslist/cardarrfindtm") == "" ){
- messageBox("환자발견시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "" ){
- messageBox("심정지발생장소 항목이 입력되지 않았습니다.","E");
- return;
- }
- if( model.getValue("hidden/list/resusteamarvbfresus") == "0000000" ){
- messageBox("CPR팀 도착전소생술 항목이 입력되지 않았습니다.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrestmflag") !="Y" && (model.getValue("/root/main/resusinfo/resuslist/cardarrestmdd") == "" || model.getValue("/root/main/resusinfo/resuslist/cardarrestmtm" ) == "")){
- messageBox("심정지 추정시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrestmflag") =="Y" && (model.getValue("/root/main/resusinfo/resuslist/cardarrestmdd") != "" || model.getValue("/root/main/resusinfo/resuslist/cardarrestmtm" ) != "")){
- messageBox("심정지 추정시간을 추청불가로 입력하였습니다! 일시를 지워주십시오!","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/resusteamcallflag") !="Y" && (model.getValue("/root/main/resusinfo/resuslist/resusteamcalldd") == "" || model.getValue("/root/main/resusinfo/resuslist/resusteamcalltm" ) == "")){
- messageBox("CPR팀 호출시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/resusteamcallflag") =="Y" && (model.getValue("/root/main/resusinfo/resuslist/resusteamcalldd") != "" || model.getValue("/root/main/resusinfo/resuslist/resusteamcalltm" ) != "")){
- messageBox("CPR팀 호출시간을 호출안함으로 입력하였습니다! 일시를 지워주십시오!","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/resusteamcallflag") !="Y" && (model.getValue("/root/main/resusinfo/resuslist/resusteamarvtm") == "" || model.getValue("/root/main/resusinfo/resuslist/resusteamarvtm") == "" )){
- messageBox("CPR팀 도착시간이 입력되지 않았습니다.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd" ) == "" || model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmtm") == "" ){
- messageBox("초기리듬 확인시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/resusteamfresusflag") !="Y" && ( model.getValue("/root/main/resusinfo/resuslist/resusfromdd") == "" || model.getValue("/root/main/resusinfo/resuslist/resusfromtm" ) == "" )){
- messageBox("CPR팀 소생술 시작시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/defibrflag") !="Y" && ( model.getValue("/root/main/resusinfo/resuslist/defibrstartdd") == "" || model.getValue("/root/main/resusinfo/resuslist/defibrstarttm" ) == "" )){
- messageBox("제세동 시작시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/resusteamfresusflag") !="Y" && ( model.getValue("/root/main/resusinfo/resuslist/resustodd") == "" || model.getValue("/root/main/resusinfo/resuslist/resustotm") == "" )){
- messageBox("소생술 종료시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("hidden/list/resusteamfresus") == "0000000" ){
- messageBox("CPR팀 소생술 항목이 입력되지 않았습니다.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrrslt") == "01" && (model.getValue("/root/main/resusinfo/resuslist/dschdethdd" ) == "" || model.getValue("/root/main/resusinfo/resuslist/dschdethtm" ) == "" )){
- messageBox("사망시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
- if( model.getValue("/root/main/resusinfo/resuslist/fstresusstrtdd") == "" || model.getValue("/root/main/resusinfo/resuslist/fstresusstrttm") == ""){
- messageBox("처음 소생술 시작시간이 입력되지 않았습니다. 날짜와 시간을 확인해주십시오.","E");
- return;
- }
-
-
- // ----------------------------------------------------------------------------------------------------------------------
- var cardarrfinddd = model.getValue("/root/main/resusinfo/resuslist/cardarrfinddd"); //환자발견시간(일자)
- var cardarrfindtm = model.getValue("/root/main/resusinfo/resuslist/cardarrfindtm"); //환자발견시간(시간)
- var cardarrgenrdd = model.getValue("/root/main/patinfo/cardarrgenrdd"); // 소생술 시행일자
- var cardarrestmdd = model.getValue("/root/main/resusinfo/resuslist/cardarrestmdd"); // 심정지 추정시간
- var resusteamcalldd = model.getValue("/root/main/resusinfo/resuslist/resusteamcalldd" ); // CPR팀 호출시간
- var resusteamarvdd = model.getValue("/root/main/resusinfo/resuslist/resusteamarvdd" ); // CPR팀 도착시간
- var initrhythmcnfmdd = model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd" ); // 초기리듬확인시간
- var resusfromdd = model.getValue("/root/main/resusinfo/resuslist/resusfromdd" ); // 소생술 시작시간
- var defibrstartdd = model.getValue("/root/main/resusinfo/resuslist/defibrstartdd" ); // 제세동 시작시간
- var resustodd = model.getValue("/root/main/resusinfo/resuslist/resustodd" ); // 소생술 종료시간
- var dschdethdd = model.getValue("/root/main/resusinfo/resuslist/dschdethdd" ); // 사망일시
- var defibrflag = model.getValue("/root/main/resusinfo/resuslist/defibrflag"); //제세동 시작시간 시행안함 항목 (Y/N)
- var fstresusstrtdd = model.getValue("/root/main/resusinfo/resuslist/fstresusstrtdd"); //처음 소생술 시작시간 날짜
- var fstresusstrttm = model.getValue("/root/main/resusinfo/resuslist/fstresusstrttm"); //처음 소생술 시작시간
- var fromdd = cardarrgenrdd.toDate().getAddDate(-1,"D").getDateFormat();
- var todd = cardarrgenrdd.toDate().getAddDate(1,"D").getDateFormat();
- var resusteamcallflag = model.getValue("/root/main/resusinfo/resuslist/resusteamcallflag");
-
-
- if( resusteamcalldt != "" ){
- if( (cardarrgenrdd != resusteamcalldd && resusteamcallflag =="N") && todd != resusteamcalldd){
- messageBox("CPR팀 호출시간은 소생술 시행일자와 같아야 합니다.","E"); return;
- }
- }
- if( resusteamarvdt != "" ){
- if( cardarrgenrdd != resusteamarvdd && todd != resusteamarvdd ){
- messageBox("CPR팀 도착시간은 소생술 시행일자와 같아야 합니다.","E"); return;
- }
- }
- if( initrhythmcnfmdt != "" ){
- if( cardarrgenrdd != initrhythmcnfmdd && todd != initrhythmcnfmdd ){
- messageBox("초기리듬확인시간은 소생술 시행일자와 같아야 합니다.","E"); return;
- }
- }
- if( resusfromdt != "" ){
- if( cardarrgenrdd != resusfromdd && todd != resusfromdd ){
- messageBox("소생술 시작시간은 소생술 시행일자와 같아야 합니다.","E"); return;
- }
- }
- if( defibrstartdt != "" ){
- if( (cardarrgenrdd != defibrstartdd && defibrflag == "N") && todd != defibrstartdd) {
- messageBox("제세동 시작시간은 소생술 시행일자와 같아야 합니다.","E"); return;
- }
- }
- if( resustodt != "" ){
- if( cardarrgenrdd != resustodd && todd != resustodd ){
- messageBox("소생술 종료시간은 소생술 시행일자와 같거나 커야 합니다.","E"); return;
- }
- }
-
- // --심정지 추정시간은 모든시간보다 같거나 빨라야함---------------------------------------------------------------------------------
-
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrestmflag" ) != "Y"){
-
- var defibrstartdt = defibrstartdd + model.getValue("/root/main/resusinfo/resuslist/defibrstarttm" ); // 제세동 시작시간
- var resustodt = resustodd + model.getValue("/root/main/resusinfo/resuslist/resustotm" ); // 소생술 종료시간
- var dschdethdt = dschdethdd + model.getValue("/root/main/resusinfo/resuslist/dschdethtm" ); // 사망일시
- var cardarrfinddt = cardarrfinddd + cardarrfindtm; // 환자발견시간
- var cardarrestmdt = cardarrestmdd + model.getValue("/root/main/resusinfo/resuslist/cardarrestmtm" ); // 심정지 추정일자
- var resusteamcalldt = resusteamcalldd + model.getValue("/root/main/resusinfo/resuslist/resusteamcalltm" ); // CPR팀 호출일자
- var fstresusstrtdt = fstresusstrtdd + fstresusstrttm; // 처음소생술시작일자
- var initrhythmcnfmdt = initrhythmcnfmdd + model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmtm" ); // 초기리듬확인일자
- var resusteamarvdt = resusteamarvdd + model.getValue("/root/main/resusinfo/resuslist/resusteamarvtm" ); // CPR팀 도착시간
- var resusfromdt = resusfromdd + model.getValue("/root/main/resusinfo/resuslist/resusfromtm" ); // CPR팀 소생술 시작시간
- var defibrstartdt = defibrstartdd + model.getValue("/root/main/resusinfo/resuslist/defibrstarttm" ); // 제세동 시작시간
- var resustodt = resustodd + model.getValue("/root/main/resusinfo/resuslist/resustotm" ); // 소생술 종료시간
-
- if( cardarrfinddt != "" && cardarrestmdt > cardarrfinddt ){
- messageBox("환자발견시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( resusteamcalldt != "" && cardarrestmdt > resusteamcalldt ){
- messageBox("CPR팀 호출시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( fstresusstrtdt != "" && cardarrestmdt > fstresusstrtdt ){
- messageBox("처음 소생술 시작시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( initrhythmcnfmdt != "" && cardarrestmdt > initrhythmcnfmdt ){
- messageBox("초기리듬확인시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( resusteamarvdt != "" && cardarrestmdt > resusteamarvdt ){
- messageBox("CPR팀 도착시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( resusfromdt != "" && cardarrestmdt > resusfromdt ){
- messageBox("CPR팀 소생술 시작시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( defibrstartdt != "" && cardarrestmdt > defibrstartdt ){
- messageBox("제세동 시작시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
- if( resustodt != "" && cardarrestmdt > resustodt ){
- messageBox("소생술 종료시간은 심정지 추정시간과 같거나 커야 합니다.","E"); return;
- }
-
- if( model.getValue("/root/main/resusinfo/resuslist/cardarrrslt") == "01" ){
- if( dschdethdt != "" ){
- if( cardarrestmdt > dschdethdt ){ messageBox("사망일시는 심정지 추정시간보다 이후 시간이여야 합니다.","E"); return; }
- }
- }
- }
- }
- }
-
- var sDocHeader = "hosinhosoutflag▦pid▦indd▦cretno▦histno▦cardarrgenrdt▦instcd";
-
- // 키값 설정부분
- var sCondData = pFlag +"▦"
- + model.getValue(xPathCardArrPatInfo+"/pid" )+"▦"
- + model.getValue(xPathCardArrPatInfo+"/indd" )+"▦"
- + model.getValue(xPathCardArrPatInfo+"/cretno")+"▦"
- + model.getValue(xPathCardArrPatInfo+"/histno")+"▦"
- +(model.getValue(xPathCardArrPatInfo+"/cardarrgenrdd") + model.getValue(xPathCardArrPatInfo+"/cardarrgenrtm"))+"▦"
- + model.getValue(xPathCardArrPatInfo+"/instcd");
-
- model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
-
-
- // if(pFlag1 == "D"){
- // 심폐소생술보고서 주치의 입력
- sDocHeader += "▦"
- + "status▦"
- + "cardarrcas▦"
- + "initrhythm▦"
- + "resusendresn▦"
- + "resusendresnetc▦"
- + "cardarrrslt▦"
- + "cardarrrsltetc▦"
- + "dschdethdd▦"
- + "dschdethtm▦"
- + "fstrgstid▦"
- + "fstrgstdt▦"
- + "memo▦"
- + "dschneurologystat";
- // + "dschneurologystat▩";
-
- sCondData += "▦"
- + pStatus + "▦"
- + model.getValue(xPathCardArrResusList + "/cardarrcas") +"▦"
- + model.getValue(xPathCardArrResusList + "/initrhythm") +"▦"
- + model.getValue(xPathCardArrResusList + "/resusendresn") +"▦"
- + model.getValue(xPathCardArrResusList + "/resusendresnetc") +"▦"
- + model.getValue(xPathCardArrResusList + "/cardarrrslt") +"▦"
- + model.getValue(xPathCardArrResusList + "/cardarrrsltetc") +"▦"
- + model.getValue(xPathCardArrResusList + "/dschdethdd") +"▦"
- + model.getValue(xPathCardArrResusList + "/dschdethtm") +"▦"
- + model.getValue(xPathCardArrResusList + "/fstrgstid") +"▦"
- + model.getValue(xPathCardArrResusList + "/fstrgstdt") +"▦"
- + model.getValue(xPathCardArrResusList + "/memo") +"▦"
- + model.getValue(xPathCardArrResusList + "/dschneurologystat") ;
- // + model.getValue(xPathCardArrResusList + "/dschneurologystat") +"▩";
-
- // model.makeValue("/root/send/docrec", sDocHeader+sCondData );
-
- // }
- // if(pFlag1 == "N"){
- // 심폐소생술보고서 간호사 입력
- sDocHeader += "▦"
- + "status▦"
- + "cardarrgoalyn▦"
- + "cardarrdiscvpsn▦"
- + "cardarrdiscvpsnetc▦"
- + "cardarrgenrplceflag▦"
- + "cardarrgenrplcedept▦"
- + "cardarrgenrplceetc▦"
- + "resusteamarvbfresus▦"
- + "resusteamarvbfresusetc▦"
- + "resusteamfresus▦"
- + "resusteamfresusetc▦"
- + "resusteamfresusflag▦"
- + "ambulancearvbfresus▦"
- + "ambulancearvbfresusetc▦"
- + "ambulanceresus▦"
- + "ambulanceresusetc▦"
- + "ercentresus▦"
- + "ercentresusetc▦"
- + "cardarrestmdd▦"
- + "cardarrestmtm▦"
- + "cardarrestmflag▦"
- + "resusteamcalldd▦"
- + "resusteamcalltm▦"
- + "resusteamcallflag▦"
- + "resusteamarvdd▦"
- + "resusteamarvtm▦"
- + "initrhythmcnfmdd▦"
- + "initrhythmcnfmtm▦"
- + "resusfromdd▦"
- + "resusfromtm▦"
- + "resustodd▦"
- + "resustotm▦"
- + "gender▦"
- + "age▦"
- + "wardcd▦"
- + "atdoctcd▦"
- + "medispclid▦"
- + "orddeptcd▦"
- + "cardarrfinddd▦"
- + "cardarrfindtm▦"
- + "hosparvbfresus▦"
- + "hosparvbfresusetc▦"
- + "hosparvbfresusynflag▦"
- + "bluebirdalarmyn▦"
- + "cardarrgenrplceward▦"
- + "cardarrgenrplcewardflag▦"
- + "cardarrgenrplcehosin▦"
- + "cardarrgenrplcehoscenter▦"
- + "cardarrgenrplcetestroom▦"
- + "cardarrgenrplcehosout▦"
- + "cardarrgenrplceetcbigo▦"
- + "fstresusexecflag▦"
- + "fstresusexecetc▦"
- + "fstresusstrtdd▦"
- + "fstresusstrttm▦"
- + "initpatcscs▦"
- + "initpatbreth▦"
- + "initpatpulse▦"
- + "defibrflag▦"
- + "defibrstartdd▦"
- + "defibrstarttm▦"
- + "defibrjul2▦"
- + "defibrtims2▦"
- + "defibrjul▦"
- + "defibrtims▦"
- + "freeairway1▦"
- + "freeairway2▦"
- + "freeairway3▦"
- + "freeairway4▦"
- + "freeairway5▦"
- + "freeairway6▦"
- + "memo▩";
-
-
- if(pFlag == "1"){
- sCondData += "▦"
- + pStatus + "▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgoalyn") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsnetc") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplceflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcedept") +"▦"
- + "▦"
- + model.getValue("hidden/list/resusteamarvbfresus") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamarvbfresusetc") +"▦"
- + model.getValue("hidden/list/resusteamfresus") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamfresusetc") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamfresusflag") +"▦"
- + "▦"
- + "▦"
- + "▦"
- + "▦"
- + "▦"
- + "▦"
- + model.getValue(xPathCardArrResusList+"/cardarrestmdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrestmtm") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrestmflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamcalldd") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamcalltm") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamcallflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamarvdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusteamarvtm") +"▦"
- + model.getValue(xPathCardArrResusList+"/initrhythmcnfmdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/initrhythmcnfmtm") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusfromdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/resusfromtm") +"▦"
- + model.getValue(xPathCardArrResusList+"/resustodd") +"▦"
- + model.getValue(xPathCardArrResusList+"/resustotm") +"▦"
- + model.getValue("/root/main/patinfo/gender") +"▦"
- + model.getValue("/root/main/patinfo/age") +"▦"
- + model.getValue("/root/main/patinfo/wardcd") +"▦"
- + model.getValue("/root/main/patinfo/atdoctcd") +"▦"
- + model.getValue("/root/main/patinfo/medispclid") +"▦"
- + model.getValue("/root/main/patinfo/orddeptcd") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrfinddd") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrfindtm") +"▦"
- + model.getValue(xPathCardArrResusList+"/hosparvbfresus") +"▦"
- + model.getValue(xPathCardArrResusList+"/hosparvbfresusetc") +"▦"
- + model.getValue(xPathCardArrResusList+"/hosparvbfresusynflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/bluebirdalarmyn") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplceward") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcewardflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosin") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehoscenter") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcetestroom") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosout") +"▦"
- + model.getValue(xPathCardArrResusList+"/cardarrgenrplceetcbigo") +"▦"
- + model.getValue(xPathCardArrResusList+"/fstresusexecflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/fstresusexecetc") +"▦"
- + model.getValue(xPathCardArrResusList+"/fstresusstrtdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/fstresusstrttm") +"▦"
- + model.getValue(xPathCardArrResusList+"/initpatcscs") +"▦"
- + model.getValue(xPathCardArrResusList+"/initpatbreth") +"▦"
- + model.getValue(xPathCardArrResusList+"/initpatpulse") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrflag") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrstartdd") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrstarttm") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrjul2") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrtims2") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrjul") +"▦"
- + model.getValue(xPathCardArrResusList+"/defibrtims") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway1") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway2") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway3") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway4") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway5") +"▦"
- + model.getValue(xPathCardArrResusList+"/freeairway6") +"▦"
- + model.getValue(xPathCardArrResusList+"/memo") +"▩";
- }
- model.makeValue("/root/send/recdata", sDocHeader+sCondData );
-
- if(submit("TXMNE02301") == true){
-
- // TextStmtInfo = "";
- // //20111208_KNUH_Start 간호일지 내역 부분 수정.
- // //Type2 저장 부분
- //
- // TextStmtInfo = "심폐소생술 보고서"
- // if(model.getValue(xPathCardArrResusList+"/cardarrestmflag") != "N"){
- // TextStmtInfo +="\n심정지 추정시간 : "+int_cardarrestmdd.label +" "+int_cardarrestmtm.label ;
- // }else{
- // TextStmtInfo +="\n심정지 추정시간 : 추정불가";
- // }
- //
- // TextStmtInfo += "\n초기환자상태";
- // if(rdo_initpatcscs.label != ""){
- // TextStmtInfo += "\n의 식 : " + rdo_initpatcscs.label;
- // }
- // if(rdo_initpatbreth.value != ""){
- // TextStmtInfo += ", 호 흡 : " + rdo_initpatbreth.value;
- // }
- // if(rdo_initpatpulse.value != ""){
- // TextStmtInfo += ", 맥 박 : " + rdo_initpatpulse.value;
- // }
- //
- //
- // if(model.getValue(xPathCardArrResusList+"/cardarrestmflag") != "N"){
- // TextStmtInfo += "\nCPR팀 호출시간"+ int_resusteamcalldd.label +" "+ int_resusteamcalltm.label;
- // }else{
- // TextStmtInfo += "\nCPR팀 호출시간 : 호출안함";
- // }
- //
- // TextStmtInfo += "\n처음 소생술 시작시간 : " + int_fstresusstrtdd.value+" "+ int_fstresusstrttm.value
- // + "\n초기리듬 확인시간 : " + int_initrhythmcnfmdd.value+" "+ int_initrhythmcnfmtm.value
- // + "\nCPR팀 도착시간 : " + int_resusteamarvdd.value+" "+ int_resusteamarvtm.value
- // + "\nCPR팀 소생술 시작시간 : " + int_resusfromdd.value+" "+ int_resusfromtm.value;
- //
- // if(model.getValue(xPathCardArrResusList+"/defibrflag") != "N"){
- // TextStmtInfo += "\n제세동 시작시간 : " + int_defibrstartdd.value+" "+int_defibrstarttm.value+" "
- // +ipt_defibrjul.value+"J "+ipt_defibrtims.value+"회 "
- // +ipt_defibrjul2.value+"J "+ipt_defibrtims2.value+"회";
- // }else{
- // TextStmtInfo += "\n제세동 시작시간 : 시행안함";
- // }
- //
- // TextStmtInfo += "\n소생술 종료시간 : " + rdo_initpatpulse.value+" "+ int_resustotm.value;
- //
- // if(model.getValue(xPathCardArrResusList+"/resusteamfresusflag") != "N"){
- // TextStmtInfo += "\nCPR팀 소생술 : ";
- // for(var i=0; i<7; i++){
- // if( chk_resusteamfresus.item(i).selected == true){
- // if( i == "0" ){
- // TextStmtInfo += "흉부압박";
- // }else if( i == "1"){
- // TextStmtInfo += "호흡보조";
- // }else if( i == "2"){
- // TextStmtInfo += "제세동";
- // }else if( i == "3"){
- // TextStmtInfo += "전문기도확보 : ("+ipt_freairway5.value+"Fr "+ipt_freairway6.value+"Cm 고정 )";
- // }else if( i == "4"){
- // TextStmtInfo += "정맥로확보";
- // }else if( i == "5"){
- // TextStmtInfo += "약물투여";
- // }else if( i == "6"){
- // TextStmtInfo += "기타 : "+int_resusteamfresusetc.value;
- // }
- // }
- // }
- // }else{
- // TextStmtInfo += "\nCPR팀 소생술 : 시도안함";
- // }
- //
- // TextStmtInfo += "\n소생술 종료사유 : " + rdo_initpatpulse.value+" "+ int_resusendresnetc.value
- // + "\n소생술 결과 : " + rdo_initpatpulse.value
- // + "\n사망일시 : " + rdo_initpatpulse.value+" "+ int_dethtm.value
- // + "\nText 입력 : " + model.getValue("/root/main/resusinfo/resuslist/memo");
- //
- // var pid = model.getValue(xPathCardArrPatInfo+"/pid");
- // var indd = model.getValue(xPathCardArrPatInfo+"/indd");
- // var cretno = model.getValue(xPathCardArrPatInfo+"/cretno");
- // var instcd = model.getValue(xPathCardArrPatInfo+"/instcd");
- //
- // alert("1");
- // setParameter("SMMNR03400_ParamBase", "recflag▦dutplaccd▦reclnkkey▩E▦010▦"+ pid + "," + indd + "," + cretno + "," + instcd+"▩");
- // setParameter("SMMNR03400_ParamSaveText", "S▦A▦"+getCurrentDate()+getCurrentTime()+"▦"+TextStmtInfo+"▩");
- // modal("SMMNR03400");
- //
- //
- model.copynode("/root/main/resusinfo","/root/resusbase");
- fSrchHistList(pFlag);
- fActionStatus(pFlag, pStatus, sRow);
- //
- // }
-
- model.removeNodeset("/root/item");
- model.refresh();
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 저장, 수정, 삭제 구분에 따른 Action 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fActionStatus(pFlag, pStatus, row){
- if(pStatus == "I"){
- datagrid2.row = getNodesetCount("/root/main/pathistinfo/pathistlist");
- fSelectHistData(pFlag);
- }else if(pStatus == "U"){
- datagrid2.row = row;
- fSelectHistData(pFlag);
- }else if(pStatus == "D"){
- model.setValue("/root/main/patinfo/selectrow", "");
- int_cardarrgenrdd.disabled = false;
-
- model.setValue(xPathCardArrPatInfo+"/cardarrgenrdd", getCurrentDate());
- model.setValue(xPathCardArrPatInfo+"/cardarrgenrtm", getCurrentTime());
- int_cardarrgenrdd.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 이력 데이터 선택 조회 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelectHistData(pFlag){
- model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/indd"));
- model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/cretno"));
- model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/instcd"));
- model.setValue("/root/main/patinfo/cardarrgenrdd", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/cardarrgenrdd"));
- model.setValue("/root/main/patinfo/cardarrgenrtm", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/cardarrgenrtm"));
- model.setValue("/root/main/patinfo/histno", model.getValue("/root/main/pathistinfo/pathistlist["+datagrid2.row+"]/histno"));
-
- fCardArrResusSrch(pFlag);
- fInputBoxInit();
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 이력 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchHistList(pFlag){
- var sDocHeader = "hosinhosoutflag▦srchdate▦pid▩"
- var sCondData = pFlag +"▦"
- + model.getValue(xPathCardArrPatInfo+"/cardarrgenrdd") +"▦"
- + model.getValue(xPathCardArrPatInfo+"/pid" )+"▩" ;
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/cond", sDocHeader+sCondData );
- //model.copyNode("/root/send/patcond", "root/send/cond") ;
- if( submit("TRMNE02301") == true ){
- // if(model.getValue("/root/main/patinfo/nursdocflag") == "N"){
- // fDateSetting();
- // }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 심폐소생술이력 조회 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCardArrResusSrch(pFlag){
- model.removeNode("/root/send");
- var sDocHeader = "hosinhosoutflag▦pid▦indd▦cretno▦cardarrgenrdt▦histno▦instcd";
- // 키값 설정부분
- var sCondData = pFlag +"▦"
- + model.getValue(xPathCardArrPatInfo+"/pid" )+"▦"
- + model.getValue(xPathCardArrPatInfo+"/indd" )+"▦"
- + model.getValue(xPathCardArrPatInfo+"/cretno")+"▦"
- +(model.getValue(xPathCardArrPatInfo+"/cardarrgenrdd") + model.getValue(xPathCardArrPatInfo+"/cardarrgenrtm"))+"▦"
- + model.getValue(xPathCardArrPatInfo+"/histno")+"▦"
- + model.getValue(xPathCardArrPatInfo+"/instcd");
-
- model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
- if(submit("TXMNE02301")){
-
- //대상자 정보
- if(model.getValue("/root/main/resusinfo/resuslist/gender" ) != "")
- model.setValue("/root/main/patinfo/gender" , model.getValue("/root/main/resusinfo/resuslist/gender" ));
-
- if(model.getValue("/root/main/resusinfo/resuslist/age" ) != "")
- model.setValue("/root/main/patinfo/age" , model.getValue("/root/main/resusinfo/resuslist/age" ));
-
- if(model.getValue("/root/main/resusinfo/resuslist/wardcd" ) != "")
- model.setValue("/root/main/patinfo/wardcd" , model.getValue("/root/main/resusinfo/resuslist/wardcd" ));
- if(model.getValue("/root/main/resusinfo/resuslist/orddeptcd" ) != ""){
- model.setValue("/root/main/patinfo/orddeptcd" , model.getValue("/root/main/resusinfo/resuslist/orddeptcd" ));
- }
- if(model.getValue("/root/main/resusinfo/resuslist/atdoctcd" ) != "")
- model.setValue("/root/main/patinfo/atdoctcd" , model.getValue("/root/main/resusinfo/resuslist/atdoctcd" ));
-
- if(model.getValue("/root/main/resusinfo/resuslist/medispclid" ) != "")
- model.setValue("/root/main/patinfo/medispclid" , model.getValue("/root/main/resusinfo/resuslist/medispclid" ));
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 입력창 초기화 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInputBoxInit(){
- //간호사 입력창 초기화
- if(model.getValue("/root/main/patinfo/nursdocflag") == "N"){
- if(model.getValue("/root/main/resusinfo/resuslist/cardarrdiscvpsnetc") == ""){
- int_cardarrdiscvpsnetc.disabled = true;
- }else{
- int_cardarrdiscvpsnetc.disabled = false;
- }
- }
-
-
- cmb_dept.dispatch("xforms-value-changed");
-
- //최초 발견자
- rdo_cardarrdiscvpsn.dispatch("xforms-value-changed");
-
- //최초 소생술 시행자
- chk_fstresusexecflag.dispatch("xforms-value-changed");
-
- //심정지 발생장소
- rdo_cardarrgenrplceflag.dispatch("xforms-value-changed");
-
- //병원도착전 처치
- var hosparvbfresus = model.getValue("/root/main/resusinfo/resuslist/hosparvbfresus");
- if( hosparvbfresus != "" ){
- chk_hosparvbfresus.dispatch("xforms-select");
- chk_hosparvbfresus.disabled = false;
- bool_hosparvbfresusynflag.disabled = false;
- }else{
- chk_hosparvbfresus.disabled = true;
- bool_hosparvbfresusynflag.disabled = true;
- }
-
- //CPR팀 도착전소생술
- var resusteamarvbfresus = model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresus");
- if( resusteamarvbfresus != "" ){
- chk_resusteamarvbfresus.dispatch("xforms-select");
- chk_resusteamarvbfresus.disabled = false;
- }else{
- chk_resusteamarvbfresus.disabled = true;
- }
-
- //심정지 추정시간-추정불가
- bool_cardarrestmflag.dispatch("xforms-value-changed");
-
- //제세동시작시간
- bool_defibrflag.dispatch("xforms-value-changed");
-
- //CPR팀 소생술
- var resusteamfresus = model.getValue("/root/main/resusinfo/resuslist/resusteamfresus");
- if( resusteamfresus != "" ){
- chk_resusteamfresus.dispatch("xforms-select");
- chk_resusteamfresus.disabled = false;
- }else{
- chk_resusteamfresus.disabled = true;
- }
-
- //CPR팀 소생술-시도안함
- bool_resusteamfresusflag.dispatch("xforms-value-changed");
-
- //소생술종료사유
- rdo_resusendresn.dispatch("xforms-value-changed");
-
- //소생술결과
- rdo_cardarrrslt.dispatch("xforms-value-changed");
-
- //CPR팀 호출시간-호출안함
- bool_resusteamcallflag.dispatch("xforms-value-changed");
-
- model.refresh();
- }
-
- /**
- * @group :
- * @ver : 2007.07.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 날짜 세팅 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDateSetting(pFlag){
-
- if(pFlag == "Init"){
- model.setValue("/root/main/resusinfo/resuslist/cardarrestmdd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/resusteamcalldd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/resusteamarvdd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/resusfromdd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/resustodd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/fstresusstrtdd", getCurrentDate());
- model.setValue("/root/main/resusinfo/resuslist/defibrstartdd", getCurrentDate());
-
- } else if(pFlag == "Change") {
- model.setValue("/root/main/resusinfo/resuslist/cardarrestmdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/resusteamcalldd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/resusteamarvdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/resusfromdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/resustodd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/fstresusstrtdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- model.setValue("/root/main/resusinfo/resuslist/defibrstartdd", model.getValue("/root/main/patinfo/cardarrgenrdd") );
- }
- model.refresh();
- }
-
- /**
- * @group :
- * @ver : 2007.12.04
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 정보 조회(환자번호)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSrchPatListInput(pFlag){
-
- setInputNodeCurText(); // 현재 인풋값 노드 반영
- fSrchHistList(pFlag);
-
- if(getNodesetCount("/root/main/pathistinfo/patinfo") >= 1 ){
- var rrgstno = model.getValue("/root/main/pathistinfo/patinfo/rrgstno1") + " - " + model.getValue("/root/main/pathistinfo/patinfo/rrgstno2");
-
- model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/patinfo/indd" ) );
- model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/patinfo/cretno" ) );
- model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/patinfo/instcd" ) );
- model.setValue("/root/main/patinfo/patnm", model.getValue("/root/main/pathistinfo/patinfo/patnm" ) );
- model.setValue("/root/main/patinfo/gender", model.getValue("/root/main/pathistinfo/patinfo/gender" ) );
- model.setValue("/root/main/patinfo/age", model.getValue("/root/main/pathistinfo/patinfo/age" ) );
- model.setValue("/root/main/patinfo/cntctel", model.getValue("/root/main/pathistinfo/patinfo/cntctel" ) );
- model.setValue("/root/main/patinfo/addr", model.getValue("/root/main/pathistinfo/patinfo/addr" ) );
-
- model.makeValue("/root/main/patinfo/wardcd", model.getValue("/root/main/pathistinfo/patinfo/wardcd" ) );
- model.makeValue("/root/main/patinfo/wardnm", model.getValue("/root/main/pathistinfo/patinfo/wardnm" ) );
- model.makeValue("/root/main/patinfo/roomcd", model.getValue("/root/main/pathistinfo/patinfo/roomcd" ) );
- model.makeValue("/root/main/patinfo/medispclid", model.getValue("/root/main/pathistinfo/patinfo/medispclid" ) );
- model.makeValue("/root/main/patinfo/atdoctcd", model.getValue("/root/main/pathistinfo/patinfo/atdoctid" ) );
- model.makeValue("/root/main/patinfo/orddrid", model.getValue("/root/main/pathistinfo/patinfo/orddrid" ) );
- model.makeValue("/root/main/patinfo/deptcd", model.getValue("/root/main/pathistinfo/patinfo/deptcd" ) );
- model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/pathistinfo/patinfo/issdeptcd" ) );
-
- model.makeValue("/root/main/patinfo/orddeptcd", model.getValue("/root/main/pathistinfo/patinfo/deptcd" ) );
- cmb_dept.dispatch("xforms-value-changed");
- cmb_dept.refresh();
-
- if(model.getValue("/root/main/patinfo/nursdocflag") == "N"){
- fDateSetting("Init");
- }else{
- model.setValue("/root/main/patinfo/cardarrgenrdd", getCurrentDate());
- int_cardarrgenrdd.disabled = false;
- }
-
- if( model.getValue("/root/main/patinfo/cardarrgenrdd") == "" ){
- model.setValue("/root/main/patinfo/cardarrgenrdd", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrdd" ));
- model.setValue("/root/main/patinfo/cardarrgenrtm", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrtm" ));
- model.setValue("/root/main/patinfo/cardarrgenrdt", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrtm" ));
- }
-
- fClearChildNode("/root/main/resusinfo/resuslist");
- fInputBoxInit();
- model.setValue(xPathCardArrPatInfo+"/rrgstno" , rrgstno);
- model.refresh();
- }else{
- messageBox("조회 결과가 없습니다.","I");
- fInitPatList();
- fInputBoxInit();
- return;
- }
- }
- /**
- * @group :
- * @ver : 2007.12.04
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 심폐소생술 보고서 환자정보 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitPatList(){
- model.setValue("/root/main/patinfo/pid" , "");
- model.setValue("/root/main/patinfo/rrgstno" , "");
- model.setValue("/root/main/patinfo/indd" , "");
- model.setValue("/root/main/patinfo/cretno" , "");
- model.setValue("/root/main/patinfo/instcd" , "");
- model.setValue("/root/main/patinfo/patnm" , "");
- model.setValue("/root/main/patinfo/grdrage" , "");
- model.setValue("/root/main/patinfo/cntctel" , "");
- model.setValue("/root/main/patinfo/addr" , "");
- model.setValue("/root/main/patinfo/ininfo" , "");
- model.refresh();
- }
|