123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392 |
- /**
- * 파일명 : AEZ0001.js
- * 작성일자 : 2007.5.18
- */
- /**
- * 세션 GET
- */
- function aezfSetSuppDeptcd() {
- var dutplcecd = getUserInfo("dutplcecd");
- //var dutplcenm = getUserInfo("dutplcenm");
- var selectplcecd = getScreenPrestDeptCd();
-
- //alert(dutplcecd + "/////" + selectplcecd);
-
- if ( selectplcecd == "" ) {
- selectplcecd = dutplcecd;
- //selectplcenm = dutplcenm;
- }
-
- model.setValue("/root/send/globalinstance/instance1", selectplcecd);
- //model.makeValue("/root/send/globalinstance/instance1nm", selectplcenm);
-
- }
- /**
- * 상단정보 Deleting=======================================================================================================================================
- */
- function aezfDelTopInfo() {
-
- // 상단정보 DataSet Clear
- delPatientInfos();
- // Main화면 상단정보 관련 DataSet Clear
- setGlobalVariable("paminfo", "");
- }
- /**
- * 상단정보 Setting=======================================================================================================================================
- * EXCU_PARAM1 : 처방일자
- * EXCU_PARAM2 : 실시처방유일번호
- */
- function aezfSetTopInfo() {
-
- var excuprcpdd = getParameter("EXCU_PARAM1");
- var excuuniqno = getParameter("EXCU_PARAM2");
- var excudutplcecd = getUserInfo("dutplcecd");
-
- var pat_info = "S▦"+ excuprcpdd +"▦"+ excuuniqno +"▦"+ excudutplcecd;
-
- setParameter("condparam", pat_info);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
-
- }
- /**
- * 수가내역 가져오기=======================================================================================================================================
- * SPAEB00201_PARAM1 : 검색구분(cd/nm)
- * SPAEB00201_PARAM2 : 검색조건(코드/명칭)
- * SPAEB00201_PARAM3 : multiyn
- * SPAEB00201_PARAM4 : multi선택 시 setting할 목적노드
- * SPAEB00201_PARAM5 : code값을 setting할 목적노드
- * SPAEB00201_PARAM6 : name값을 setting할 목적노드
- * SPAEB00201_PARAM7 : 수가를 setting할 목적노드
- */
- function fGetCalScorCd( vCond, vCdnm, bMultiyn , vMultiDestXPath, vCdDestXPath, vNmDestXPath, vAmtDestXPath){
- clearParameter("SPAEB00201_PARAM1");
- clearParameter("SPAEB00201_PARAM2");
- clearParameter("SPAEB00201_PARAM3");
- clearParameter("SPAEB00201_PARAM4");
- clearParameter("SPAEB00201_PARAM5");
- clearParameter("SPAEB00201_PARAM6");
- //clearParameter("SPAEB00201_PARAM7");
-
- setParameter ("SPAEB00201_PARAM1" , vCond);
- setParameter ("SPAEB00201_PARAM2" , vCdnm);
- setParameter ("SPAEB00201_PARAM3" , bMultiyn);
- setParameter ("SPAEB00201_PARAM4" , vMultiDestXPath);
- setParameter ("SPAEB00201_PARAM5" , vCdDestXPath );
- setParameter ("SPAEB00201_PARAM6" , vNmDestXPath);
- //setParameter ("SPAEB00201_PARAM7" , vAmtDestXPath);
-
- modal("SPAEB00201");
- }
-
- /**
- * 수가내역 대상그리드 set=======================================================================================================================================
- * vGrdObj : 대상그리드
- * vSrcXPath : 목적노드set
- * vDupCheckCo : dup check column no
- * vDupCheck : dup check yn
- * vCodeNode : 수가코드 목적 노드
- * vNameNode : 수가처방명 목적 노드
- * vHeaderAddRows : header row default값(1) 보다 큰 row수
- */
- function fSetOcd(vGrdObj, vSrcXPath, vDupCheckCol, vDupCheck, vCodeNode, vNameNode, vSessiondept, vHeaderAddRows ) {
- //alert(vGrdObj+' - '+vSrcXPath+' - '+vDupCheckCol+' - '+ vDupCheck+' - '+ vCodeNode+' - '+vNameNode+' - '+ vHeaderAddRows);
- if( vGrdObj == null ) return ;
- if( vSrcXPath == "" ) return ;
- if( model.getValue("/root/temp/okflag") != "ok" ) return ;
- var cnt = getNodesetCount(vSrcXPath);
-
- var grdcnt = vGrdObj.rows;
- //alert(grdcnt);
- if( vHeaderAddRows != "" ){
- grdcnt =parseInt( vGrdObj.rows) - parseInt( vHeaderAddRows ) ;
- }
- //alert(grdcnt+' - '+ cnt);
- var vDupCheckVal = "";
- var i = 0;
- if( cnt == 1 ) {
- vDupCheckVal = model.getValue(vSrcXPath + "/calcscorcd" );
- if( vDupCheck == "Y" ) {
- if( fCheckDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
- if( messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
- return ;
- }
- }
- }
- vGrdObj.addRow();
-
- if( vCodeNode != "" ){
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vCodeNode , vDupCheckVal );
- }
- if( vNameNode != "" ){
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vNameNode , model.getValue(vSrcXPath + "/ordnm" ) );
- }
-
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" , vDupCheckVal );
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/ordnm" ) );
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" , vSessiondept );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutodd" , '99991231' );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
- model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn" , "Y" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0" );
-
- // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excuclscd", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/eqmtifyn", "N");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/readdrid3nm", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispgbn", model.getValue(vSrcXPath + "/rsltdispgbn" ) );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/partcntstats", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/phocntstats", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/curetims", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexcupossyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvplceflag", "2");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutm", "0");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvmultitmplcd", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexmpcnt", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/pacsnocretyn", "N");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/etceqmtifyn", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd", model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
- model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1", model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
-
- }
- else {
- for( var i = 1 ; i <= cnt ; i++ ){
- vDupCheckVal = model.getValue(vSrcXPath + "[" + i + "]/calcscorcd" );
- if( vDupCheck == "Y" ) {
- if( fCheckDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
- if( messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
- continue ;
- }
- }
- }
- vGrdObj.addRow();
-
- if( vCodeNode != "" ){
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vCodeNode , vDupCheckVal );
- }
- if( vNameNode != "" ){
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vNameNode , model.getValue(vSrcXPath + "[" + i + "]/ordnm" ) );
- }
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" , vDupCheckVal );
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "[" + i + "]/ordnm" ) );
- model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" , vSessiondept );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutodd" , '99991231' );
- model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "[" + i + "]/prcpexecdeptcd" ) );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn" , "Y" );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0" );
-
- // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excuclscd", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/eqmtifyn", "N");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/readdrid3nm", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispgbn", model.getValue(vSrcXPath + "/rsltdispgbn" ) );
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/partcntstats", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/phocntstats", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/curetims", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexcupossyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvplceflag", "2");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutm", "0");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvmultitmplcd", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexmpcnt", "1");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/pacsnocretyn", "N");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/etceqmtifyn", "-");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn", "Y");
- model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd", model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
- model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1", model.getValue(vSrcXPath + "/prcpexecdeptcd1" ) );
- grdcnt++;
- }
- }
- model.refresh();
- }
-
- /************************************************************************************************
- **fCheckDup
- @param :
- * vGrdObj : grid control
- * vCheckVal : dup check 대상 값
- desc : grid dup value check.
- *************************************************************************************************/
- function fCheckDup( vGrdObj, vCheckCol , vCheckVal ){
- var cnt = vGrdObj.rows ;
- for( var i = 1; i <= cnt ; i++) {
- //alert(vGrdObj.valueMatrix(i, vCheckCol));
- //alert(vCheckVal);
- if( vGrdObj.valueMatrix(i, vCheckCol) == vCheckVal ){
- return false;
- }
- }
- }
-
-
- /************************************************************************************************
- *
- * aezfAddPrcpMngt
- @param
- * vGrdObj : 목적그리드
- * vSrcXPath : 목적노드set
- * desc : Add PrcpMngt value check.
- *************************************************************************************************/
- function aezfAddPrcpMngt(vGrdObj, vSrcXPath) {
- if ( vGrdObj.row >= vGrdObj.fixedRows ) {
-
- var i = vGrdObj.row;
-
- var pid = model.getValue(vSrcXPath+"["+i+"]/pid");
- var orddd = model.getValue(vSrcXPath+"["+i+"]/orddd");
- var cretno = model.getValue(vSrcXPath+"["+i+"]/cretno");
- var instcd = getUserInfo("dutplceinstcd");
- var ioflag = model.getValue(vSrcXPath+"["+i+"]/prcpgenrflag");
- var issdept = model.getValue("/root/send/globalinstance/instance1");
- var menuparam = model.getValue("/root/properties/menu/menuparam");
-
- if ( ioflag == "O" || ioflag == "S" ) ioflag = "O";
- else ioflag = "I";
- //alert(ioflag);
- }
- //alert(vGrdObj.rows);
- //alert(vGrdObj.row);
- //alert(vSrcXPath);
- //alert("pid->"+pid+", "+"orddd->"+orddd+", "+"cretno->"+cretno+", "+"instcd->"+instcd+", "+"ioflag->"+ioflag);
-
- //return;
- setParameter ( "SMMMO00200_pid", pid );
- setParameter ( "SMMMO00200_orddd", orddd);// ( orddd: 입원:입원일, 외래:수진일)
- setParameter ( "SMMMO00200_cretno", cretno );
- setParameter ( "SMMMO00200_instcd", instcd);
- setParameter ( "SMMMO00200_ioflag", ioflag );
-
- //?????? ???? (2008.01.29_??? ??. ???? ???? ???.)
- // if(issdept == "2010302030" ) {
- // setParameter ("SMMMO00200_defdeptcd", issdept );
- // }else {
- setParameter ( "SMMMO00200_issdept", issdept );
- // }
-
- if(menuparam == "PAM"){
- setGlobalVariable("menuparam", "PAM");
- }
-
- //setParameter ( "SMMMO00200_pid", "14" );
- //setParameter ( "SMMMO00200_orddd", "20070521");// ( orddd: 입원:입원일, 외래:수진일)
- //setParameter ( "SMMMO00200_cretno", "3" );
- //setParameter ( "SMMMO00200_instcd", "012");
- //setParameter ( "SMMMO00200_ioflag", "I" );
-
- modal ( "SMMMO00200" );
- }
-
-
- /************************************************************************************************
- *
- * aezfSendMarkBuf
- @param
- * grdobj : 목적그리드
- * colobj : 목적ColRef
- * xpath : 목적노드set
- * desc : Buffering Send check.
- *************************************************************************************************/
- function aezfSendMarkBuf(grdobj, colobj, xpath) {
-
- var bufCnts = "";
- var rowidx;
- var colref_viewcnts = grdobj.colref(colobj);
- for (var i = 0; i < grdobj.selectedRows; i++)
- {
- rowidx = grdobj.selectedRow(i);
- bufCnts += grdobj.valueMatrix(rowidx, colref_viewcnts) + "\r\n";
- }
- window.clipBoardData = bufCnts;
- //alert(bufCnts);
- }
-
-
- /* @group : Popup 공통 1
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : Popup Sample
- */
- function aezfPopUpModalessSample(displayid, maingridlistid, path, targetpath) {
- if ( maingridlistid.row == 0 ) return;
- var row = maingridlistid.row;
-
- open(displayid,"","","","",path+"[" + row + "]/pid", targetpath);
- }
- /* @group : Popup 공통 1
- * @ver : 2007.06.14
- * @by : 장준원
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : Popup Sample
- */
- function aezfPopUpSample(displayid, maingridlistid, path, targetpath) {
- if ( maingridlistid.row == 0 ) return;
- var row = maingridlistid.row;
-
- modal(displayid,"","","","",path+"[" + row + "]/pid", targetpath);
- }
- function aezfPopUpRsrvSample(displayid, maingridlistid, path) {
- if ( maingridlistid.row == 0 ) return;
- var row = maingridlistid.row;
-
- var pid = model.getValue(path+"[" + row + "]/pid");
- var suppdeptcd = model.getValue("/root/send/globalinstance/instance1");
- var sflag = pid + "▦" + "A" + "▦" + suppdeptcd;
- //alert(sflag);
- setParameter("opener_parameter_id", sflag);
- //alert(getParameter("opener_parameter_id"));
- open(displayid, 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; min:hidden, max:hidden;");
- }
-
- /************************************************************************************************
- *
- * aezfGridSetColor
- @param
- * path : 목적그리드
- * chkcol : 목적ColRef
- * chkval : 비교value
- * imagename : ImageName
- * desc : Background Image check.
- *************************************************************************************************/
- function aezfGridSetColor(path, chkcol, chkval, imagename ) {
- //alert('IN');
- var srchLength1 = model.instances(0).selectNodes( path ).length;
- for ( var i = 1; i <= srchLength1; i++ ) {
- if ( model.getValue ( path+"["+ i +"]/"+chkcol ) == chkval ) {
- grd_subresultdetail1.rowstyle(i, "data", "background-image") = "../../../com/commonweb/images/"+imagename;
- grd_subresultdetail1.rowstyle(i, "data", "background-repeat") = "repeat-x";
- //grd_subresultdetail1.rowstyle(i, "data", "text-align") = "center";
- } else {
- grd_subresultdetail1.rowstyle(i, "data", "background-image") = "";
- //grd_subresultdetail1.rowstyle(i, "data", "text-align") = "left";
- }
- }
- }
- /************************************************************************************************
- 함수명 : setRowStyle ()
- 인자 :
- String gridID - 그리드 아이디
- String styleFlag - 컬러 인덱스
- String data - 데이터 값
- Srting colRef - 비교할 컬럼 Ref
- String [control] - 조건 smaller | smallerThen | equal | biggerThen | bigger
- 결과값 :
- 함수설명 : 그리드 특정 컬럼값을 비교하여 로우 백컬러 변경
- * 사용예) setRowStyle("datagrid1", "1", "1", "b", "bigger");
- ************************************************************************************************
- 작 성 자 : 어 승옥
- 작 성 일 : 2006. 12. 01
- ************************************************************************************************/
- function aezfSetRowStyle( gridID , styleFlag , data , colRef , control ) {
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" ,
- "#43c8f5" , "#ff9933" , "#3399ff" , "#9999cc" , "#FFC8C8" , "#fab7bf" , "#ffff00" , "#ccffcc" , "#FF9A00");
- var styleFlags = styleFlag.split("^");
- var datas = data.split("^");
-
- if( control == null || control == "" )
- control = "equal";
-
- var controls = control.split("^");
- gridObj = document.all(gridID);
- gridObj.backcoloralternate = "transparent";
-
- for( var j = 0 ; j < datas.length ; j++ ) {
-
- var dataValue = datas[j];
- var styleValue = style[styleFlags[j]];
-
- for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
-
- if(controls[j] == null)
- controls[j] = "equal";
-
- switch( controls[j] ) {
- case "small":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) < dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "smallThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) <= dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "bigger":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) > dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- case "biggerThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) >= dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- /*
- case "notEqual":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) != dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- */
- case "equal":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- }
- }
- }
-
- }
- /************************************************************************************************
- 함수명 : aezfSetCellStyle ()
- 인자 :
- String gridID - 그리드 아이디
- String styleFlag - 컬러 인덱스
- String data - 데이터 값
- Srting colRef - 비교할 컬럼 Ref
- String setColRef - 변경할 컬럼 Ref
- String fillflag - 변경할 항목 구분(B: background, F: font)
- 결과값 :
- 함수설명 : 그리드 특정 컬럼값을 비교하여 셀 백컬러 변경
- * 사용예) aezfSetCellStyle("grd_mainordlist5" , "9^8^7" , "V^P^A" , "aftrcptinfo", "calcscorcd");
- ************************************************************************************************
- 작 성 자 : 어 승옥
- 작 성 일 : 2006. 12. 01
- ************************************************************************************************/
- function aezfSetCellStyle( gridID , styleFlag , data , colRef , setColRef, fillflag ) {
- /*
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" , "#43c8f5" ,
- "#ff9933" , "#3399ff" , "#9999cc" , "#FFC8C8");
- */
-
- var fillStyle = "";
- var style;
-
- if ( fillflag == "B" ) {
- fillStyle = "background-color";
- style = new Array("#ffff00", "#ccffcc", "#FF9A00");
- } else if ( fillflag == "F" ) {
- fillStyle = "color";
- style = new Array("#ffff00", "#ccffcc", "#FF9A00");
- }
-
- var styleFlags = styleFlag.split("^");
- var datas = data.split("^");
-
- gridObj = document.all(gridID);
- gridObj.backcoloralternate = "transparent";
-
-
- for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
- gridObj.cellstyle(fillStyle, i, gridObj.colRef(setColRef)) = "#000000";
- gridObj.cellstyle("font-weight", i, gridObj.colRef(setColRef)) = "normal";
- }
-
- for( var j = 0 ; j < datas.length ; j++ ) {
-
- var dataValue = datas[j];
- var styleValue = style[styleFlags[j]];
-
- for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
-
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.cellstyle(fillStyle, i, gridObj.colRef(setColRef)) = styleValue;
- gridObj.cellstyle("font-weight", i, gridObj.colRef(setColRef)) = "bold";
- }
- }
- }
-
- }
- function aezfSetFontRowStyle( gridID , styleFlag , data , colRef , control ) {
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" ,
- "blue" ,
- "#c8e67b" ,
- "green" ,
- "#ff9933" ,
- "red" ,
- "#9999cc",
- "#5A5A5A",
- "#000000"
- );
- var styleFlags = styleFlag.split("^");
- var datas = data.split("^");
-
- if( control == null || control == "" )
- control = "equal";
-
- var controls = control.split("^");
- gridObj = document.all(gridID);
- gridObj.backcoloralternate = "transparent";
-
- for( var j = 0 ; j < datas.length ; j++ ) {
-
- var dataValue = datas[j];
- var styleValue = style[styleFlags[j]];
-
- for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
-
- if(controls[j] == null)
- controls[j] = "equal";
-
- switch( controls[j] ) {
- case "small":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) < dataValue ) {
-
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "smallThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) <= dataValue ) {
-
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "bigger":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) > dataValue ) {
-
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- case "biggerThen":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) >= dataValue ) {
-
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- /*
- case "notEqual":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) != dataValue ) {
-
- gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
- }
- break;
- */
- case "equalBold":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- case "equal":
- if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
- gridObj.rowstyle( i , "data" , "color" ) = styleValue;
- // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
- }
- break;
- }
- }
- }
-
- }
- /************************************************************************************************
- *
- * aezfTrim
- @param
- * code1 : 목적ColRef
- * value : charcode
- * desc : Ascii Code의 Trim check.
- *************************************************************************************************/
- function aezfTrim(code1, value) {
-
- var startPoint = 0; // subString 하기 위한 시작 포인트
- var endPoint = code1.length; // subString 하기 위한 끝 포인트
- //문자열앞에 공백문자가 들어 있는 Index 추출
- while( (startPoint < endPoint) && (code1.charCodeAt(startPoint) == value) )
- {
- startPoint++;
- }
-
- //문자열뒤에 공백문자가 들어 있는 Index 추출
- while( (startPoint < endPoint) && (code1.charCodeAt(endPoint-1) == value) )
- {
- endPoint--;
- }
- // 공백을 제거했으면 subString하여 결과문자열을 리턴하고 제거한 내용이 없으면 그대로 리턴
- return ( (startPoint > 0) || (endPoint < code1.length) ) ? code1.substring(startPoint, endPoint) : code1;
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.11.09
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 인스턴스를 삽입
- * @return :
- *************************************************************************************************/
- function aezfInsertInstance(cdGroupID, codeName, codeID, targetXpath) {
- //model.refresh();
-
- model.copyNode("/root/hidden/comcd",targetXpath);
- var nodelist = instance1.selectNodes("/root/hidden/comcd/"+cdGroupID);
- var newNode = instance1.createNode("element", cdGroupID, "");
- var childnode1 = instance1.createNode("element", "cdnm", "");
- var childnode2 = instance1.createNode("element", "cdid", "");
- newNode.appendChild(childnode1);
- newNode.appendChild(childnode2);
- if (nodelist.length > 0)
- {
- var currNode = root.hidden.comcd.insertBefore(newNode, nodelist.item(0));
- model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdnm", codeName);
- model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdid", codeID);
- }
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.11.09
- * @by : 장준원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 인스턴스를 원하고자 하는 인스턴스에 삽입(aezfInsertInstance를 화면에서 다중으로 사용할 때)
- * @return :
- *************************************************************************************************/
- function aezfInsertInstance2(baseXpath, cdGroupID, codeName, codeID, targetXpath) {
- //model.refresh();
- model.copyNode(baseXpath,targetXpath);
- var nodelist = instance1.selectNodes(baseXpath+"/"+cdGroupID);
- var newNode = instance1.createNode("element", cdGroupID, "");
- var childnode1 = instance1.createNode("element", "cdnm", "");
- var childnode2 = instance1.createNode("element", "cdid", "");
- newNode.appendChild(childnode1);
- newNode.appendChild(childnode2);
- if (nodelist.length > 0)
- {
- var currNode = root.hidden.comcd.insertBefore(newNode, nodelist.item(0));
- model.setValue(baseXpath+"/"+cdGroupID+"[1]/cdnm", codeName);
- model.setValue(baseXpath+"/"+cdGroupID+"[1]/cdid", codeID);
- }
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.12.12
- * @by : 장준원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : OCR출력 과 출력 리스트 조회
- * @return :
- *************************************************************************************************/
- function aezfOcrListPrint(xpath, row1, colid1, colid2, colid3, colid4, colid5, colid6, colid7, colid8, colid9, colid10, colid11, colid12) {
- model.removeNodeset("/root/temp/para");
-
- model.makeValue("/root/temp/para/pid", model.getValue(xpath+"[" + row1 + "]/" + colid1 ) );
- model.makeValue("/root/temp/para/orddd", model.getValue(xpath+"[" + row1 + "]/" + colid2 ) );
- model.makeValue("/root/temp/para/orddeptcd", model.getValue(xpath+"[" + row1 + "]/" + colid3 ) );
- model.makeValue("/root/temp/para/orddeptnm", model.getValue(xpath+"[" + row1 + "]/" + colid4 ) );
- model.makeValue("/root/temp/para/orddrid", model.getValue(xpath+"[" + row1 + "]/" + colid5 ) );
- model.makeValue("/root/temp/para/drnm", model.getValue(xpath+"[" + row1 + "]/" + colid6 ) );
-
- // I/ O /E만 받는다.
- if ( colid7 == "S" ) colid7 = "O";
- else if( colid7 == "D" ) colid7 = "I";
- else colid7 = colid7;
-
- model.makeValue("/root/temp/para/ordtype", model.getValue(xpath+"[" + row1 + "]/" + colid7 ) );
- model.makeValue("/root/temp/para/patnm", model.getValue(xpath+"[" + row1 + "]/" + colid8 ) );
- model.makeValue("/root/temp/para/inroomcd", model.getValue(xpath+"[" + row1 + "]/" + colid9 ).getTrim() );
- model.makeValue("/root/temp/para/rrgstno1", model.getValue(xpath+"[" + row1 + "]/" + colid10 ) );
- model.makeValue("/root/temp/para/rrgstno2", model.getValue(xpath+"[" + row1 + "]/" + colid11 ) );
- model.makeValue("/root/temp/para/cretno", model.getValue(xpath+"[" + row1 + "]/" + colid12 ) );
- model.refresh();
- modal("SMMRF02300", "", "200", "200", "SMMRF02300","/root/temp/para","/root/temp/para");
- }
- /**
- * TOPMOST 호출=======================================================================================================================================
- */
- function aezfTopMost(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos,onCloseEvent) {
- var rtn = "";
- //body.disabled = true;
- if (userProp == null) {
- userProp = "min:hidden;max:hidden;";
- } else {
- userProp = "min:hidden;max:hidden;" + userProp;
- }
-
- ///model.makeValue(gvMyCBOnClosePath,onCloseEvent);
- rtn = openInternal("modeless_topmost",id,"scn",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
-
- //body.disabled = false;
- return rtn;
- }
- /**
- * Age Calculation =======================================================================================================================================
- */
- function aezfgetFullAge(pResidentNo, pDate, pPosition)
- {
- if(isNaN(pResidentNo)) return -1;
- var pivotYY = "";
- var pivotMM = "";
- var pivotDD = "";
- var regYY = "";
- var regMM = "";
- var regDD = "";
- if(typeof(pDate) == "undefined" || pDate == "" || pDate == null) {
- var today = new Date();
- pivotYY = today.getYear();
- pivotMM = today.getMonth() + 1;
- pivotDD = today.getDate();
- } else {
- pivotYY = pDate.getYear();
- pivotMM = pDate.getMonth() + 1;
- pivotDD = pDate.getDate();
- }
- if(pResidentNo.length == 13 ){
- gender = pResidentNo.substr(6, 1);
- regYY = eval(pResidentNo.substr(0, 2));
- regMM = eval(pResidentNo.substr(2, 2));
- regDD = eval(pResidentNo.substr(4, 2));
- if(gender == '3' || gender == '4' || gender == '7' || gender == '8') {
- regYY += 2000;
- } else if(gender == '0' || gender == '9') {
- regYY += 1800;
- } else {
- regYY += 1900;
- }
- }else if(pResidentNo.length == 8 && isValidDateTime(pResidentNo, "YYYYMMDD")){
- regYY = eval(pResidentNo.substr(0, 4));
- regMM = eval(pResidentNo.substr(4, 2));
- regDD = eval(pResidentNo.substr(6, 2));
- }else{
- return -1;
- }
- var age = pivotYY - regYY;
- if(age > 0) {
- if(pivotMM == regMM) {
- if(pivotDD < regDD) {
- age -= 1;
- }
- } else if(pivotMM < regMM) {
- age -= 1;
- }
- }
-
- if ( pPosition == "M")
- {
- //12개월이하일때 계산
- if(age <= 0){
- if(pivotYY > regYY) {
- pivotMM += 12;
- }
- age = pivotMM - regMM ;
- if(pivotDD < regDD) {
- age -= 1;
- }
- age = "0."+age;
- }
- }
- return age;
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.12.12
- * @by : 장준원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @param
- * baseXpath : Return Instance (deptcd)
- * baseXpath2 : Return Instance (deptnm, 등등)
- * @desc : 부서코드 팝업창 호출 후 조회
- * @return :
- *************************************************************************************************/
- function aezfCommDeptCodeList(baseXpath, baseXpath2) {
- var dept_deptcd = model.getValue(baseXpath);
- if (dept_deptcd == null || dept_deptcd == "" || dept_deptcd == " ") {
- messageBox("부서코드가 입력되지","E007");
- model.setValue( baseXpath, "");
- model.setValue( baseXpath2, "");
- model.refresh();
- return false;
- }else {
- model.makeValue("/root/temp/prestdeptcd","");
- model.makeValue("/root/temp/prestdeptnm","");
- var search_condition = "deptnm";
- var search_term = "";
- var receive_deptcd_path = "/root/temp/prestdeptcd";
- var receive_deptnm_path = "/root/temp/prestdeptnm";
- model.setValue(receive_deptcd_path, "");
- model.setValue(receive_deptnm_path, "");
- var standard_yn = null;
- var ord_deptflag = null;
- zbcfOpenInstDeptCodeList(
- search_condition,
- search_term,
- receive_deptcd_path,
- receive_deptnm_path,
- standard_yn,
- ord_deptflag,
- new Array("deptcd", "depthngnm")
- );
- model.setValue(baseXpath, model.getValue("/root/temp/prestdeptcd"));
- model.setValue(baseXpath2, model.getValue("/root/temp/prestdeptnm"));
- model.refresh();
- }
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.12.12
- * @by : 장준원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @param
- * baseXpath : Return Instance (PID)
- * baseXpath2 : Return Instance (Patnm+Sex+age, 등등)
- * @desc : 환자정보 팝업창 호출
- * @return :
- *************************************************************************************************/
- function aezfCommPatInfoList(baseXpath, baseXpath2) {
- var ptbs_pid = model.getValue(baseXpath);
-
- if (ptbs_pid == null || ptbs_pid == "" || ptbs_pid == " ") {
- messageBox("환자번호가 입력되지","E007");
- model.setValue( baseXpath, "");
- model.setValue( baseXpath2, "");
- model.refresh();
- return false;
- } else {
-
- modal("SPPMC02500", "", "200", "200", "SPPMC02500", baseXpath, "/root/send");
- model.setValue( baseXpath, model.getValue("/root/main/patinfo/patinfolist/pid") );
- model.setValue( baseXpath2, model.getValue("/root/main/patinfo/patinfolist/hngnm")+" ["+model.getValue("/root/main/patinfo/patinfolist/sex")+'/'+model.getValue("/root/main/patinfo/patinfolist/age")+"]" );
-
- model.refresh();
- }
- }
- /************************************************************************************************
- * @group :
- * @ver : 2007.12.12
- * @by : 장준원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @param
- * baseXpath : Send Instance (검색조건)
- * rtnXpath : Return Instance (Userid+Usernm, 등등)
- * copyXpath : Return Copy Instance (Userid)
- * copyXpath2 : Return Copy Instance (Usernm, 등등)
- * @desc : 사용자정보 팝업창 호출
- * @return :
- *************************************************************************************************/
- function aezfCommUserInfoList(baseXpath, rtnXpath, copyXpath, copyXpath2) {
-
- var usrb_usrid = model.getValue(copyXpath);
- if (usrb_usrid == null || usrb_usrid == "" || usrb_usrid == " ") {
- messageBox("사용자번호가 입력되지","E007");
- model.setValue( copyXpath, "");
- model.setValue( copyXpath2, "");
- model.refresh();
- return false;
- }else {
- model.resetInstanceNode(baseXpath); // Instance 초기화
- model.removeNodeset(rtnXpath+"/list"); // Instance 초기화
-
- model.setValue(baseXpath+"/param", "_OneS"); // 사용자 한 명만을 검색하기 위한 파라미터 설정
- modal("SPZSU10103", "", "200", "200", "SPZSU10103", baseXpath, "/root/main/temp");
-
- var iParam = getParameter("SPZSU10103_");
- setCSVToNode(rtnXpath, iParam);
- clearParameter("SPZSU10103_");
-
- model.setValue( copyXpath, model.getValue(rtnXpath+"/list/userid") ); // 사용자 ID
- model.setValue( copyXpath2, model.getValue(rtnXpath+"/list/usernm") ); // 사용자 이름+등등
-
- model.refresh();
- }
- }
- function aezfGetSrchPatInfo(cond1, cond2, cond3, cond99, rtnXpath) {
-
- model.makeValue ( "/root/send/cond1", cond1 );
- model.makeValue ( "/root/send/cond2", cond2 );
- model.makeValue ( "/root/send/cond3", cond3 );
- model.makeValue ( "/root/send/cond99", cond99 );
- if (!submit ( "TRMMO02501",false )) {
- model.resetInstanceNode (rtnXpath );
- model.refresh();
- return "0";
- }else {
- return "1";
- }
-
- }
- /************************************************************************************************
- * 간호일지 II 호출
- * 비처방기준
- * 20080923 , 장준원
- *************************************************************************************************/
- function aezfGetNurseRecII(Xpath, Row, Gbn) {
- // Gbn : 1 (Angio) , 2 (심도자) , 3 (CT)
- var orddd = model.getValue(Xpath+"[" + Row + "]/orddd");
- var cretno = model.getValue(Xpath+"[" + Row + "]/cretno");
- var instcd = getUserInfo("dutplceinstcd");
- var orddeptcd = model.getValue(Xpath+"[" + Row + "]/orddeptcd");
- var orddrid = model.getValue(Xpath+"[" + Row + "]/orddrid")
- var pid = model.getValue(Xpath+"[" + Row + "]/pid");
- var hngnm = model.getValue(Xpath+"[" + Row + "]/patnm");
- // var age = model.getValue(Xpath+"[" + Row + "]/age");
- var rrgstno1 = model.getValue(Xpath+"["+Row+"]/rrgstno1");
- var rrgstno2 = model.getValue(Xpath+"["+Row+"]/rrgstno2");
- var age = aezfgetFullAge(rrgstno1+rrgstno2);
- //alert('1 age->'+age);
- if ( age == "" ) age = model.getValue(Xpath+"[" + Row + "]/age");
- //alert('2 age->'+age);
- var ioflag = model.getValue(Xpath+"[" + Row + "]/prcpgenrflag");
-
- if ( Gbn == "1" ) var Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦019▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
- if ( Gbn == "2" ) var Baseparam = "recflag▦dutplaccd▦reclnkkey▩Q▦020▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
- if ( Gbn == "3" ) var Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦025▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
- // var Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦019▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
- var ASTparam = "pid ▦ instcd ▦ hngnm ▦ age ▦ orddd ▦ cretno ▦ ioflag ▦ orddeptcd ▦ orddrid ▩" + pid + "▦" + instcd + "▦" + hngnm + "▦" + age + "▦" + orddd + "▦" + cretno+ "▦" + ioflag + "▦" + orddeptcd + "▦" + orddrid + "▩";
- //alert('Baseparam->'+Baseparam);
- //alert('ASTparam->'+ASTparam);
-
- setParameter("SMMNR03400_ParamBase", Baseparam);
- setParameter("SMMNR03400_AST", ASTparam );
-
-
- // modal("SMMNR03400");
-
- if(window.children.item("SMMNR03400") == null)
- {
- var xpt = 300;
- var ypt = 0;
-
- aezfTopMost("SMMNR03400",1,xpt,ypt,"SMMNR03400","","","",0,0);
-
- }else {
-
- window.children.item("SMMNR03400").model.refresh();
- window.children.item("SMMNR03400").model.dispatch("xforms-ready");
- }
- }
- /************************************************************************************************
- * ???? SATO ??? ??
- *************************************************************************************************/
- function fBarcdPrtSato(grd, orddeptnm,roomcd,prcpgenrflag,portyn,precureprcpflag) {
- var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
- var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
- var portOpenCheck = "";
- var LCount = 0;
- var iXPos = 0;
- var iYPos = 0;
-
- var sSndMsg = "";
- if (sPrntKind == 0) return;
- var sCommKind = model.getValue(barcdRef + "[1]/commkind");
- var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
- var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
-
- if (sLeftBank == "" || sLeftBank == "-") sLeftBank = 0;
- if (sTopBank == "" || sTopBank == "-") sTopBank = 0;
-
- var orddeptnm = orddeptnm;
- var roomcd = roomcd;
- var prcpgenrflag = prcpgenrflag;
- var portyn = portyn;
- var precureprcpflag = precureprcpflag;
-
- var sSndMsg = "";
- var sBcNo = "";
- var iprintcnt = 0;
- var pid = model.getValue("/root/main/patrem/selectpat/pid");
- var hngnm = model.getValue("/root/main/patrem/selectpat/hngnm");
- var sna = model.getValue("/root/main/patrem/selectpat/sna");
- var rrgstno = model.getValue("/root/main/patrem/selectpat/rrgstno");
- var styleFlags = model.getValue("/root/main/patrem/prcpdeliveinfo/prcpdelivefact").split("]");
- var cmt = styleFlags[0];
-
- //포터블 및 선처치 여부 ( 진료:Y, 간호:P )
- //간호포터블접수만 표시
- if( portyn == "P" && precureprcpflag == "N") {
- portyn = "P";
- }
- else if(portyn == "N" && precureprcpflag == "Y" ) {
- portyn ="?";
- }
- else if(portyn == "N" && precureprcpflag == "N" ) {
- portyn ="";
- }
- else if(portyn == "P" && precureprcpflag == "Y") {
- portyn ="P?";
- }
-
- sSndMsg = "AA103500500"; // 시작위치 셋팅
- // ????
- iXPos = Number(sLeftBank) + 5;
- iYPos = Number(sTopBank) + 5;
-
- //sSndMsg += "V" + iXPos + "H" + iYPos + "S" + pid;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid, 1.5, 1);
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid + " [" + rrgstno.substring(0,6) + "]", 1.5, 1);
-
- // ??? + ????
- iXPos = Number(sLeftBank) + 5;
- iYPos = Number(sTopBank) + 35;
- //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, hngnm+" "+ sna);
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), sna+" "+ hngnm, 1.5, 1);
-
- // ??? (??)
- if(prcpgenrflag =="I" || prcpgenrflag =="E" ) {
- iXPos = Number(sLeftBank) + 5;
- iYPos = Number(sTopBank) + 65;
- //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, orddeptnm + "("+ roomcd + ")" );
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), orddeptnm + "("+ roomcd + ")", 1.5, 1);
- }
- else{
- iXPos = Number(sLeftBank) + 5;
- iYPos = Number(sTopBank) + 65;
- //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, orddeptnm );
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), orddeptnm, 1.5, 1);
- }
-
- // ??? ? ?????
- iXPos = Number(sLeftBank) + 5;
- iYPos = Number(sTopBank) + 95;
- //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, portyn );
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), portyn, 1.5, 1);
-
- //Routine ? LongStream
- iXPos = Number(sLeftBank) + 60;
- iYPos = Number(sTopBank) + 95;
- //sSndMsg += "V" + iYPos + "H" + iXPos + "S" +cmt +"]";
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), cmt +"]", 1.5, 1);
-
- //???
- iXPos = Number(sLeftBank) +125 ;
- iYPos = Number(sTopBank) + 15;
- sSndMsg += "V" + iXPos + "H" + iYPos + "BG02100" + pid; // ???
-
-
- //???????
- iXPos = Number(sLeftBank) +50 ;
- iYPos = Number(sTopBank) + 240;
- //sSndMsg += "V" + iXPos + "H" + iYPos + "S" + "*" + pid + "*";
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), "*" + pid + "*", 0.5 , 0.5);
-
- //??(??)
- sSndMsg += "Q" + "1" + "Z";
- CommAX.SendMsg(sSndMsg);
- }
- //=====================================================================================================================================================================================
- // @ SATO BarCode Print 설정
- //=====================================================================================================================================================================================
- function fBarcdLbPrtSato(pid, patnm, gbn, rrgstno1, rrgstno2, barpid, excugrp, currentdate, sex, age)
- {
- var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
- var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
- var portOpenCheck = "";
- var LCount = 0;
- var iXPos = 0;
- var iYPos = 0;
-
- var sSndMsg = "";
- //alert("sPrntKind : " + sPrntKind);
-
- if (sPrntKind == 0) return;
- var sCommKind = model.getValue(barcdRef + "[1]/commkind");
- var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
- var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
-
- if (sLeftBank == "" || sLeftBank == "-") sLeftBank = 0;
- if (sTopBank == "" || sTopBank == "-") sTopBank = 0;
-
- var sSndMsg = "";
- var sBcNo = "";
- var iprintcnt = 0;
- var styleFlags = model.getValue("/root/main/patrem/prcpdeliveinfo/prcpdelivefact").split("]");
-
- var cmt = styleFlags[0];
-
- sSndMsg = "AA103500500"; // 시작위치 셋팅
-
-
- iXPos = Number(sLeftBank) + 20;
- iYPos = Number(sTopBank) + 75;
- sSndMsg += "V" + iXPos + "H" + iYPos + "BG02100" + "*"+pid+' '+excugrp+"*";
-
- // 등록번호 + 그룹코드
- iXPos = Number(sLeftBank) + 140;
- iYPos = Number(sTopBank) + 130;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), "*"+pid+' '+excugrp+"*", 0.5, 1);
-
- // 등록번호
- iXPos = Number(sLeftBank) + 30;
- iYPos = Number(sTopBank) + 180;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid, 2.5, 1);
-
- // 그룹코드
- iXPos = Number(sLeftBank) + 380;
- iYPos = Number(sTopBank) + 180;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), excugrp, 2.5, 1);
-
- // 환자명
- iXPos = Number(sLeftBank) + 30;
- iYPos = Number(sTopBank) + 230;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), patnm, 2.5, 1);
-
- // 성별
- iXPos = Number(sLeftBank) + 260;
- iYPos = Number(sTopBank) + 230;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), sex, 2.5, 1);
-
- //나이
- iXPos = Number(sLeftBank) + 380;
- iYPos = Number(sTopBank) + 230;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), age, 2.5, 1);
- //주민번호
- iXPos = Number(sLeftBank) + 280;
- iYPos = Number(sTopBank) + 300;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), rrgstno1+"-"+gbn, 1.5 , 0.5);
-
- sSndMsg += "Q" + "1" + "Z";
- CommAX.SendMsg(sSndMsg);
- }
- //=====================================================================================================================================================================================
- // @ 촬영실 배정관리 SATO BarCode Print 설정
- //=====================================================================================================================================================================================
- function fBarcdPhoLbPrtSato(pid, patnm, sna, roomcd, excupartcd, prcpdelivefact, deptengabbr, erprcpflag, prcpnm, barpid)
- {
- var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
- var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
- var portOpenCheck = "";
- var LCount = 0;
- var iXPos = 0;
- var iYPos = 0;
-
- var sSndMsg = "";
- //alert("sPrntKind : " + sPrntKind);
-
- if (sPrntKind == 0) return;
- var sCommKind = model.getValue(barcdRef + "[1]/commkind");
- var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
- var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
-
- if (sLeftBank == "" || sLeftBank == "-") sLeftBank = 0;
- if (sTopBank == "" || sTopBank == "-") sTopBank = 0;
-
- var sSndMsg = "";
- var sBcNo = "";
- var iprintcnt = 0;
- var styleFlags = model.getValue("/root/main/patrem/prcpdeliveinfo/prcpdelivefact").split("]");
-
- var cmt = styleFlags[0];
-
- sSndMsg = "AA103500500"; // 시작위치 셋팅
-
- //바코드
- iXPos = Number(sLeftBank) + 140;
- iYPos = Number(sTopBank) + 10;
- sSndMsg += "V" + iYPos + "H" + iXPos + "BG02100" + barpid; // 바코드
-
-
- // 등록번호
- iXPos = Number(sLeftBank) + 0;
- iYPos = Number(sTopBank) + 125;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid, 3.0, 1);
- sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + pid + "L0101";;
- //%2M
- // 환자명
- iXPos = Number(sLeftBank) + 250;
- iYPos = Number(sTopBank) + 125;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), patnm, 2.0, 1);
- //sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + patnm + "L0101";
-
- // 병실코드
- iXPos = Number(sLeftBank) + 0;
- iYPos = Number(sTopBank) + 170;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), roomcd, 3.0, 1);
- sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + roomcd + "L0101";;
-
- // 진료과
- iXPos = Number(sLeftBank) + 260;
- iYPos = Number(sTopBank) + 170;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), deptengabbr, 3.0, 1);
- sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + deptengabbr + "L0101";;
-
- // 성별나이
- iXPos = Number(sLeftBank) + 400;
- iYPos = Number(sTopBank) + 170;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), sna, 3.0, 1);
- sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + sna + "L0101";;
-
- // 처방명
- iXPos = Number(sLeftBank) + 0;
- iYPos = Number(sTopBank) + 210;
- //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), prcpnm, 3.0, 1);
- //sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + prcpnm + "L0101";
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), prcpnm, 2, 1);
-
- // 처방전달사항
- iXPos = Number(sLeftBank) + 0;
- iYPos = Number(sTopBank) + 250;
- sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), prcpdelivefact, 1,1);
- //sSndMsg += "V" + iYPos + "H" + iXPos + "L0203U" + prcpdelivefact + "L0101";;
-
- sSndMsg += "Q" + "1" + "Z";
- CommAX.SendMsg(sSndMsg);
- }
- // 검사실용 동명이인 체크실시
- function aezfCheckNameConflict(pid, suppdeptcd, excuroomcdid, excuroomgrpcdid) {
-
- // 필수체크
- if ( pid == '' || pid == null) {
-
- messageBox("차트번호가 입력되지 않았습니다.\r\n 차트번호를", "I007");
-
- return;
-
- } else {
-
- model.makeValue("/root/send/nameconflict/pid", pid);
- model.makeValue("/root/send/nameconflict/suppdeptcd", suppdeptcd);
- model.makeValue("/root/send/nameconflict/excuroomcdid", excuroomcdid);
- model.makeValue("/root/send/nameconflict/excuroomgrpcdid", excuroomgrpcdid);
- model.makeValue("/root/temp/nameconflict/conflictyn", "");
-
- submit("TRAER00209");
-
- if (model.getValue("/root/temp/nameconflict/conflictyn") == "Y") {
- messageBox("현재 환자와 성명이 동일한 환자가 존재합니다.\r\n" +
- " 주의하여 작업하시기 바랍니다.", "I000");
-
- return false;
- } else {
-
- return true;
- }
- }
- }
|