123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- /*
-
- 공여자등록(SMMNA00600.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var focusInBackColor = "#ffcc99";
- var focusOutBackColor = "#ffffff";
- //-------------------------
- // 화면 호출시
- //-------------------------
- function finit() {
- model.removeNodeset("/root/main/patinfo/patlist"); //환자현황 리스트를 지운다.
- model.removeNodeset("/root/main/patmapinfo/patmap"); //공여자매핑 현황 리스트를 지운다.
- model.removeNodeset("/root/main/dnorprcpinfo/dnorprcplist"); //헌혈경력이력을 지운다.
-
- zbcfGetCodeList(new Array("M0376","L0095"), new Array("/root/init/M0376list","/root/init/L0095list")); //혈액형,직업코드
- fcode(); //콤보에 값설정
- datagrid7.extendLastCol = "scroll"; //그리드우측여백정리
- datagrid8.extendLastCol = "scroll"; //그리드우측여백정리
- datagrid9.extendLastCol = "scroll"; //그리드우측여백정리
- datagrid7.frozenCols = datagrid7.colRef("brgstno"); //헌혈경력이력
- datagrid9.frozenCols = datagrid9.colRef("dnorrrgstno"); //공여자매핑 현황 리스트
- datagrid8.frozenCols = datagrid8.colRef("rrgstno"); //환자현황 리스트
-
- //----------------------------------------------------------------
- //조회시 자료가 없으면 instance가 제거된다. 그러므로 복사해놓는다.
- //----------------------------------------------------------------
- model.makenode("/root/tmp");
- model.copyNode("/root/tmp","/root/main/dnorprcpinfo"); //공여자 입력정보 저장
- fGetPatinfo();
- }
- //--------------------------
- // 상단정보 내리기
- //--------------------------
- function fGetPatinfo() {
- var sPath = "/root/main/paminfo";
- //설정된 상단정보를 불러옴
- var node = getGlobalVariable("paminfo");
- if (node !=null) {
- model.makeNode(sPath);
- setCSVToNode(sPath, node);
- var pid, indd, cretno, mskind, histstat;
- pid = model.getValue(sPath +"/list/pid");
-
- //patinfo 정보 셋팅
- if ( !isNull(pid) ) {
- model.setValue("/root/main/leftref/cond" , "2");
- model.setValue("/root/main/leftref/conddata", model.getValue(sPath +"/list/pid"));
- fpatient();
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.12.18
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공통코드 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fcode(flag){
- submit("TRMNA00601")
- }
- /**
- * @group :
- * @ver : 2007.12.18
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fpatient(flag){
-
- var cond = model.getValue("/root/main/leftref/cond");
- var conddata = model.getValue("/root/main/leftref/conddata");
-
- //조회값
- if(conddata.length==0){
- messageBox("검색할 값을 ", "C001");
- model.setfocus("inp_code");
- return;
- }
-
- //주민번호로 조회인 경우
- if(cond == "0"){
- if(conddata.length<6){
- if(conddata.length==0){
- }else{
- messageBox("최소6자 이상", "C001");
- model.setfocus("inp_code");
- return;
- }
- }
- }
- //이름으로 조회인 경우
- if(cond == "1"){
- if(conddata.length<2){
- if(conddata.length==0){
- return;
- }else{
- messageBox("최소2자 이상", "C001");
- model.setfocus("inp_code");
- return;
- }
- }
- }
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/cond",model.getValue("/root/main/leftref/cond"));
- model.makeValue("/root/send/conddata",conddata);
-
- submit("TRMNA00602")
- }
- /**
- * @group :
- * @ver : 2007.12.20
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공여자 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fdnorselt(flag){
- if(flag != "mapping"){ //조회버튼클릭시 또는 공여자조회 주민번호 입력란에서 enter시
- var gbtext = model.getValue("/root/main/rghtref/dnorrrgstno"); //공여자조회 주민번호 입력란
- if(gbtext == ""){
- messageBox("검색할 값을", "C001");
- model.setfocus("inp_dnorno");
- return;
- }
- if(gbtext.length<13){
- messageBox("주민번호가 정상적이지 않습니다.", "E999", "");
- model.setfocus("inp_dnorno");
- return;
- }
- }
- if(flag == "mapping"){ //공여자 매핑현황리스트에서 클릭시
- var iRow = datagrid9.row //공여자 매핑현황리스트
- var Rows = datagrid9.rows
- var xPatMap = "/root/main/patmapinfo/patmap"; //공여자 매핑현황리스트
-
- model.setValue("/root/main/rghtref/dnorno", model.getValue(xPatMap+"["+iRow+"]/dnorno"));
- model.setValue("/root/main/rghtref/dnornm", model.getValue(xPatMap+"["+iRow+"]/dnornm"));
- model.setValue("/root/main/rghtref/dnorrrgstno",model.getValue(xPatMap+"["+iRow+"]/dnorrrgstno"));
-
- for(i=1; i<Rows; i++){ //선택정리
- model.setValue(xPatMap+"["+i+"]/flag","0");
- }
- model.setValue(xPatMap+"["+iRow+"]/flag","1");
- }
-
- model.removeNodeset("/root/send");
- //model.makeValue("/root/send/gbtext",model.getValue("/root/main/rghtref/gbtext"));
- model.makeValue("/root/send/dnorno",model.getValue("/root/main/rghtref/dnorno"));
-
- if(submit("TRMNA00603")){
- /*
- var doncareryn = model.getValue("/root/main/dnorprcpinfo/dnorprcp/doncareryn"); //헌혈경험유무
- if(doncareryn == "Y"){
- input56.disabled = false; //헌혈경험 무
- input58.disabled = false; //최근헌혈일
- input58.refresh();
- input56.refresh();
- }else{
- input56.disabled = true;
- input58.disabled = true;
- input58.refresh();
- input56.refresh();
- // model.makenode("/root/main/dnorprcpinfo/dnorprcp");
- // model.copyNode("/root/main/dnorprcpinfo/dnorprcp", "/root/send/tmp");
- }
- */
- if(flag == "mapping"){
- var iRow = datagrid9.row //공여자매핑정보
- var xPatMap = "/root/main/patmapinfo/patmap"; //공여자매핑정보
-
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/doncode",model.getValue(xPatMap+"["+iRow+"]/doncode"));
- radio14.refresh(); //헌혈구분
- }
-
- var tempinstance = "/root/main/dnorprcpinfo";
- if (model.instances(0).selectNodes(tempinstance+ "/dnorprcp").length == 0) {
- model.copyNode(tempinstance,"/root/tmp"); //공여자 입력정보 저장
- }
- }
- }
- //---------------------
- // control 찾기
- //---------------------
- function fControlFind(xPath) {
- var childObjCnt = document.controls.length;
- var childObj;
-
- for (var i=0; i < childObjCnt; i++) {
- childObj = document.controls.item(i);
- var ref = childObj.attribute("ref");
-
- if (ref == xPath) {
- return childObj.attribute("id");
- break;
- }
- }
- return "";
- }
- //---------------------
- /**
- * 20090219 dhkim
- * 저장전 유효성체크
- */
- function fIsValid(){
-
- var xPath = "/root/main/dnorprcpinfo/dnorprcp";
- var nNode = model.instances(0).selectSingleNode(xPath);
- var max = nNode.childNodes.length;
-
- var obj, objNm, chkflag, objContNm;
-
- if (model.getValue(xPath + "/dnorrrgstno1") == "") {
- messageBox("주민등록번호를 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnorrrgstno1");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/dnorrrgstno2") == "") {
- messageBox("주민등록번호를 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnorrrgstno2");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/dnorsex") == "") {
- messageBox("성별을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnorsex");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/dnorage") == "") {
- messageBox("나이를 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnorage");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/dnornm") == "") {
- messageBox("성명을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnornm");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/jobcd") == "") {
- messageBox("직업을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/jobcd");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/bdht") == "") {
- messageBox("신장을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/bdht");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/bdwt") == "") {
- messageBox("체중을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/bdwt");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/btype") == "") {
- messageBox("혈액형을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/btype");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- if (model.getValue(xPath + "/doncareryn") == "") {
- messageBox("헌혈경험을 입력하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/doncareryn");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- var rrgstno = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno1")
- + model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno2"); //주민번호
- //20090212 dhkim
- //나이 만17세 미만 50세 이상인 경우 저장시 '공여자 나이를 확인하세요' valid체크
- var birth = getFullAge(rrgstno);
- var dnorage = model.getValue(xPath + "/dnorage");
- if(birth < 17 || birth >= 50 || dnorage < 17 || dnorage >= 50){
- messageBox("공여자 나이를 확인하세요.", "E999", "");
- objContNm = fControlFind(xPath + "/dnorrrgstno1");
- if(objContNm != "") {
- model.setFocus(objContNm);
- }
- return false;
- }
-
- return true;
- }
- /**
- * @group :
- * @ver : 2007.12.26
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공여자 정보 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fdnorsave(){
- var xPath = "/root/main/dnorprcpinfo/dnorprcp";
- var nNode = model.instances(0).selectSingleNode(xPath);
- var max = nNode.childNodes.length;
-
- if(fIsValid()){
-
- //20080903 default 입력
- var dontims = model.getValue(xPath + "/dontims");//헌혈횟수
- var rectdondd = model.getValue(xPath + "/rectdondd");//최근헌혈일
- var doncareryn = model.getValue("/root/main/dnorprcpinfo/dnorprcp/doncareryn");//헌혈경험
- if(dontims == null || dontims == ''){
- dontims = '0';
- }
- if(rectdondd == null || rectdondd == ''){
- rectdondd = '00000000';
- }
-
- if(doncareryn == "N"){//헌혈경험무
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dontims" , "0");//헌혈횟수
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/rectdondd", "00000000");//최근헌혈일
- }else{//헌혈경험유
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dontims" , dontims);
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/rectdondd", rectdondd);
- }
-
- //사용하지 않음 btype에 합쳐진 혈액형이 들어감(20080115)
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorabo", '-');
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorrh", '-');
-
-
- model.removeNodeset("/root/send");
- model.makenode("/root/send");
- model.copyNode("/root/send", "/root/main/dnorprcpinfo/dnorprcp");
-
- if(!submit("TXMNA00601")){
- messageBox('공여자 등록을 실패하였습니다.', 'E999');
- return;
- }
-
- }
- }
- /**
- * @group :
- * @ver : 2007.12.26
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공여자 정보 mapping 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fmapping(flag){
- //매핑생성
- if(flag == "ins"){
- var dnorno = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorno"); //공여자입력란
- var doncode = model.getValue("/root/main/dnorprcpinfo/dnorprcp/doncode");
- var Rows = datagrid8.rows; //환자리스트
- var iRow = datagrid8.row;
- if(iRow<0){
- messageBox("환자를 선택 하지", "E007");
- return;
- }
-
- if(dnorno==""){
- messageBox("공여자를 검색 또는 저장이 되지 않아 Mapping을", "E001");
- return;
- }
- if(doncode==""){
- messageBox("헌혈구분을 선택 하지 않아 Mapping을", "E001");
- return;
- }
- var xPatList = "/root/main/patinfo/patlist"; //환자리스트
- model.removeNodeset("/root/send");
-
- for(i=1; i<Rows; i++){
- var flag = model.getValue(xPatList+"["+i+"]/flag"); //선택되었으면
- if(flag == 1){
- model.makeValue("/root/send/pid", model.getValue(xPatList+"["+i+"]/pid"));
- model.makeValue("/root/send/hngnm", model.getValue(xPatList+"["+i+"]/hngnm"));
- model.makeValue("/root/send/sex", model.getValue(xPatList+"["+i+"]/sex"));
- model.makeValue("/root/send/age", model.getValue(xPatList+"["+i+"]/age"));
- model.makeValue("/root/send/rrgstno1", model.getValue(xPatList+"["+i+"]/rrgstno1"));
- model.makeValue("/root/send/rrgstno2", model.getValue(xPatList+"["+i+"]/rrgstno2"));
- break;
- }
- }
-
- model.makeValue("/root/send/m", "I");
- model.makeValue("/root/send/dnorno", model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorno"));
- //model.makeValue("/root/send/dnorseqno", model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorseqno"));
-
- var tempcode = "";
- var tempflag = "";
- var tempkindcd = "";
-
- tempcode = model.getValue("/root/main/dnorprcpinfo/dnorprcp/doncode");
- tempflag = tempcode.substr(0,1);
- tempkindcd = tempcode.substr(1,1);
-
- model.makeValue("/root/send/donflag" ,tempflag );
- model.makeValue("/root/send/donkindcd" ,tempkindcd );
- /*
- }else if(flag == "upt"){
- //매핑수정
- var iRow = datagrid9.row; //공여자 매핑현황 리스트
- var xPatMap = "/root/main/patmapinfo/patmap"; //공여자 매핑현황 리스트
- var Rows = datagrid8.rows; //환자 현황 리스트
- var xPatList = "/root/main/patinfo/patlist"; //환자 현황 리스트
- if(iRow < 0){
- messageBox("공여자를 선택 하지", "E007");
- return;
- }
- // model.removeNodeset("/root/send");
- // for(i=1; i<Row; i++){
- // var flag = model.getValue(xPatList+"["+i+"]/flag");
- // if(flag == 1){
- // model.makeValue("/root/send/pid",model.getValue(xPatList+"["+i+"]/pid"));
- // }
- // }
- model.makeValue("/root/send/m","U");
- model.makeValue("/root/send/pid", model.getValue(xPatMap+"["+iRow+"]/pid"));
- model.makeValue("/root/send/dnorno", model.getValue(xPatMap+"["+iRow+"]/dnorno"));
- model.makeValue("/root/send/dnorseqno", model.getValue(xPatMap+"["+iRow+"]/dnorseqno"));
- var tempcode = "";
- var tempflag = "";
- var tempkindcd = "";
-
- tempcode = model.getValue("/root/main/dnorprcpinfo/dnorprcp/doncode");
- tempflag = tempcode.substr(0,1);
- tempkindcd = tempcode.substr(1,1);
-
- model.makeValue("/root/send/donflag" ,tempflag );
- model.makeValue("/root/send/donkindcd" ,tempkindcd );
- */
- }else if(flag == "del"){
- //매핑취소
- var iRow = datagrid9.row; //공여자 매핑현황 리스트
- var xPatMap = "/root/main/patmapinfo/patmap"; //공여자 매핑현황 리스트
- var Rows = datagrid8.rows; //환자 현황 리스트
- var xPatList = "/root/main/patinfo/patlist"; //환자 현황 리스트
- if(iRow < 0){
- messageBox("공여자를 선택 하지", "E007");
- return;
- }
- model.removeNodeset("/root/send");
- /*
- for(i=1; i<Row; i++){
- var flag = model.getValue(xPatList+"["+i+"]/flag");
- if(flag == 1){
- model.makeValue("/root/send/pid",model.getValue(xPatList+"["+i+"]/pid"));
- }
- }
- */
- model.makeValue("/root/send/m","D");
- model.makeValue("/root/send/pid", model.getValue(xPatMap+"["+iRow+"]/pid"));
- model.makeValue("/root/send/dnorno", model.getValue(xPatMap+"["+iRow+"]/dnorno"));
- model.makeValue("/root/send/dnorseqno", model.getValue(xPatMap+"["+iRow+"]/dnorseqno"));
- }
-
- if(submit("TXMNA00602")){
- fpatmapselect("map")
- }
- }
- /**
- * @group :
- * @ver : 2007.12.27
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공여자 정보 mapping 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fpatmapselect(flag){
- var Rows = datagrid8.rows;
- var iRow = datagrid8.row;
- var xPatList = "/root/main/patinfo/patlist"; //환자현황 리스트
-
- //model.setValue("/root/main/dnorprcpinfo/dnorprcp/doncode","");
-
- if (Rows <= 1 || iRow < 0) return;
-
- if(flag != "map"){
- for(i=1; i<Rows; i++){
- model.setValue(xPatList+"["+i+"]/flag","0");
- }
- model.setValue(xPatList+"["+iRow+"]/flag","1");
- }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/pid",model.getValue(xPatList+"["+iRow+"]/pid"));
-
- if(submit("TRMNA00604")){
- }
- }
- /**
- * @group :
- * @ver : 2007.12.27
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공여자 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fdnorprcprrg(){
- setInputNodeCurText();
- var dnorrrgstno1 = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno1");
- var dnorrrgstno2 = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno2");
-
- if(dnorrrgstno2.length == 7 && dnorrrgstno1.length == 6){
- rrgstno = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno1") + model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno2")
- input59.value = rrgstno;
- input59.refresh();
- fdnorselt();
-
- var dnornm = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnornm");
- if(dnornm == ""){
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno1",dnorrrgstno1);
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno2",dnorrrgstno2);
- model.refresh();
- input59.value = "";
- input59.refresh();
- }
- }
- }
- //-------------------------------------
- // 주민 번호 확인
- //-------------------------------------
- function fdnorrrgstnocheck(flag) {
- var dnorrrgstno1 = "";
- var dnorrrgstno2 = "";
- var tempValue1 = "";
- var tempValue2 = "";
- dnorrrgstno1 = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno1");
- dnorrrgstno2 = model.getValue("/root/main/dnorprcpinfo/dnorprcp/dnorrrgstno2"); //input45.currentText;
- tempValue1 = dnorrrgstno1 + dnorrrgstno2;
- //나이자동계산설정
- tempValue2 = getFullAge(tempValue1);
- if ( tempValue2 == -1) {
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorage", "");
- } else {
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorage", tempValue2);
- }
- inp_inage.refresh();
- //주민번호체크
- tempValue2 = isResidentNo(tempValue1);
- if (tempValue2) {
- tempValue2 = getGender(dnorrrgstno2);
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorsex", tempValue2 );
- } else {
- messageBox("유효한 주민번호가 아닙니다.", "E999", "");
- model.setValue("/root/main/dnorprcpinfo/dnorprcp/dnorsex", "" );
- model.setfocus("inp_inrrgstno2");
- return;
- }
- rad_insex.refresh();
- }
- // --------------------------------------------------
- // 상단환자정보세팅하기
- // --------------------------------------------------
- function fSetPatInfo()
- {
- var pGrd = datagrid8;
- if (pGrd.rows <=1 || pGrd.row <= 0) return;
-
- var pGrdRow = pGrd.row;
-
- var sPath = "/root/main/patinfo/patlist["+ pGrdRow+"]" ;
- //우측마우스버튼클릭시도 상단올릴수 있도록
- // var sChk = model.getValue(sPath + "/flag"); //선택된자료만
- // if (sChk != "1") return;
-
- var siogb = model.getValue(sPath + "/iogb");
- if (siogb == "입원") siogb = "I";
- if (siogb == "외래") siogb = "O";
-
- if (siogb == "") {
- messageBox("접수정보가 없습니다.", "E999", "");
- return;
- }
- var pid = model.getValue(sPath + "/pid");
- var orddd = model.getValue(sPath + "/orddd");
- var cretno = model.getValue(sPath + "/cretno");
- var instcd = getUserInfo("dutplceinstcd");
-
- var param = siogb + "▦" + pid + "▦" + orddd + "▦" + cretno + "▦" + instcd;
- //alert(param);
-
- setParameter("condparam", param);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- /*
- var useyn = getParameter("SPMMO08900_rtn_useyn");
- if(useyn == "Y"){
- setParameter("SPMMO08900_rtn_useyn", "");
- fInitPamInfo(); //화면 기본 정보 설정
-
- }else{
- return;
-
- }
- */
- }
- // --------------------------------------------------
- // 오른쪽 마우스버튼
- // --------------------------------------------------
- function fnonmousedown() {
- var pGrd = datagrid8;
- pGrd.row = pGrd.mouseRow;
- if (pGrd.rows <= 1 || pGrd.row <= 0 ) return;
- fShowPopupMenu("datagrid8","/root/main/menuitems/inmenu/item");
-
- /*
- if (model.getValue( "/root/main/dsc/dscList["+grd_dscList.mouseRow+"]/pid")== "") return;
- var colnm = grd_dscList.valueMatrix(0, grd_dscList.mouseCol);
- var tmpcareinrmdd = model.getValue( "/root/main/dsc/dscList["+grd_dscList.mouseRow+"]/tmpcareinrmdd");
- var oppatflagcd = model.getValue( "/root/main/dsc/dscList["+grd_dscList.mouseRow+"]/oppatflagcd");
- colnm = colnm.substring(0,2);
-
- var sdschdd1 = model.getValue( "/root/main/dsc/dscList["+grd_dscList.mouseRow+"]/dschdd");
- sdschdd1 = sdschdd1.replace("-","");
- sdschdd1 = sdschdd1.substring(0,1);
-
- //---(수술환자+angio(수술정보없음)
- // if(oppatflagcd=="D"&&colnm== "입실"&&tmpcareinrmdd.substring(0,1)=="-") { // DSC 환자, 입실시각칼럼, 입실시각이 적용되지 않은 경우("-")에만 입실시각 메뉴 나타나도록
- // fShowPopupMenu("grd_dscList","/root/main/menuitems/inmenu/item");
- // }else {
- // fShowPopupMenu("grd_dscList","/root/main/menuitems/grdmenu/item");
- // }
-
- if (rdo_dscflag.value == "D") {
- //if(colnm== "입실"&&tmpcareinrmdd.substring(0,1)=="-") { // DSC 환자, 입실시각칼럼, 입실시각이 적용되지 않은 경우("-")에만 입실시각 메뉴 나타나도록
- if(colnm== "입실") { // DSC 환자, 입실시각칼럼, 입실시각이 적용되지 않은 경우("-")에만 입실시각 메뉴 나타나도록
- fShowPopupMenu("grd_dscList","/root/main/menuitems/inmenu/item");
- }else {
- fShowPopupMenu("grd_dscList","/root/main/menuitems/grdmenu/item");
- }
- } else {
- fShowPopupMenu("grd_dscList","/root/main/menuitems/grdmenu/item");
- }
- */
- }
- // --------------------------------------------------
- // 팝업메뉴
- // --------------------------------------------------
- function fShowPopupMenu(gridID, menuPath)
- {
- var gridObj = document.controls.item(gridID);
- if(event.button == 3) {
- if(gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows){
- window.setPopupMenu(true, menuPath, "name", "func", false);
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- //-------------------------------------
- // 오른쪽 마우스 호출되는 팝업둑ENR
- //-------------------------------------
- function fSetPopup01() {
- //상단올리기
- fSetPatInfo();
- modal("SMMNA01300", "", "", "", "", "", ""); //공여자처방입력
- }
- function fSetPopup02() {
- //상단올리기
- fSetPatInfo();
- modal("SMMNA00700", "", "", "", "", "", ""); //공여자문진
- }
- function fSetPopup03() {
- //상단올리기
- fSetPatInfo();
- modal("SMMRF02300", "", "", "", "", "", ""); //ocr서식지출력
- }
- function fSetPopup04() {
- //상단올리기
- fSetPatInfo();
- modal("SMMNA00900", "", "", "", "", "", ""); //검사결과판정조회
- }
- function fSetPopup05() {
- //상단올리기
- fSetPatInfo();
- modal("SMMMO02500", "", "", "", "", "", ""); //환자진료정보조회
- }
- function fSetPopup06() {
- //상단올리기
- fSetPatInfo();
- modal("SMAER00800", "", "", "", "", "", ""); //통합검사결과조회
- }
- /*
- * 팝업
- */
- function fSearchPatInfo() {
- var flag = model.getValue("/root/main/rghtref/dnorno");
- // var vPid = "";
- // if (flag =="") return;
- vTemp = model.getValue("/root/main/rghtref/dnorno");
- var vsrchcond = "1";
-
- //dnorno
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/dnorno", vTemp);
- model.makeValue("/root/temp/autoflag", "Y"); //Y:조회 내역이 1건일 경우 자동 화면 닫기
- //NON:조회 내역이 없을 경우 자동 화면 닫기
-
- //dnornm
- if ( vTemp.isNumber() != true ) {
- vsrchcond = "2";
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/dnornm", vTemp);
- model.makeValue("/root/temp/autoflag", "Y");
- }
- //팝업조건설정
- modal("SPMNA02000", "1","150", "150", "SPMNA02000", "/root/temp", "/root/send");
-
- //리턴값
- if (model.getValue("/root/main/popupendflag") == "ok") {
- var idnorno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnorno");
- var idnornm = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnornm");
- var irrgstno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnorrrgstno1") +
- model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnorrrgstno2") ;
-
- model.setValue("/root/main/rghtref/dnorno", idnorno );
- model.setValue("/root/main/rghtref/dnornm", idnornm );
- model.setValue("/root/main/rghtref/dnorrrgstno",irrgstno );
- model.refresh();
-
- //조회값이 존재하면 자동으로 조회함
- fdnorselt();
- }
- }
- /*
- * 엑셀출력
- */
- function fExcel(){
-
- var pGrd = datagrid8;
- if (pGrd.rows > pGrd.fixedrows ) {
- var fileName = window.fileDialog("save", ",", false, "공여자리스트_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "") {
- //1번true : 숨긴 row에 대한 display(true)
- //2번true : 숨긴 col에 대한 display(true)
- //false : 콤보에서 label값을 기록(false)
- pGrd.saveExcel(fileName, "SheetName", false, false, "", "", false);
- messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
- }
- } else {
- messageBox("자료가 존재하지 않습니다.", "E999", "");
- }
- }
- /*
- 공여자 신규 등록
- */
- function fDnorInsert() {
- //model.resetInstanceNode("/root/main/dnorprcpinfo/dnorprcp");
-
- //model.removeNodeset("/root/main/dnorprcpinfo/dnorprcplist");
- //resetInstanceNode
- //node에 해당하는 노드 하나만 남기고, 같은 node Name 을 갖는 노드들은 삭제시켜준다.
- //다른 노드들을 삭제시키고 남겨진 노드의 속성이나 value 값은공백으로 세팅이 된다.
- model.resetInstanceNode("/root/main/rghtref"); //조회항목 CLEAR
- model.resetInstanceNode("/root/main/dnorprcpinfo/dnorprcp"); //입력항목 CLEAR
- model.refresh();
-
- alert("공여자를 신규로 입력합니다");
- model.setfocus("inp_inrrgstno1");
- }
- //--------------------------
- // 컨트롤focusin backcolor
- //--------------------------
- function ffocusInBackColor() {
- var Control = document.all.item(event.currentTarget);
- Control.attribute("background-color") = focusInBackColor;
- }
- function ffocusOutBackColor() {
- var Control = document.all.item(event.currentTarget);
- Control.attribute("background-color") = focusOutBackColor;
- }
|