123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873 |
- var xInlvListPath = "/root/main/inlvinfo/inlvlist"; //입원방문관리
- var xDschlvListPath = "/root/main/dschlvinfo/dschlvlist"; //퇴원방문관리
- var xTestlvListPath = "/root/main/testlvinfo/testlvlist"; //검사대기방문관리
- var xMedilvListPath = "/root/main/medilvinfo/medilvlist"; //진료대기방문관리
- // 초기화
- function fInitialize(){
-
- zbcfGetCodeList(new Array("M0375",'M0376','P0341','P0008','P0010'), new Array("/root/comcodelist/bdtppartcd_cmblist","/root/comcodelist/bdbtype_cmblist","/root/comcodelist/rsrvflag_cmblist","/root/comcodelist/insukind_cmblist","/root/comcodelist/suppkind_cmblist"), true);
- fGetNursHardCdInfo("'R2'", getCurrentDate());
-
- model.removeNodeset("/root/main/inlvinfo/inlvlist");
- model.resetInstanceNode("/root/send");
- model.setValue("/root/main/cond/fromdd",getCurrentDate());
- model.setValue("/root/main/cond/todd",getCurrentDate());
- ipt_fromdd.refresh();
- ipt_todd.refresh();
-
- submit("TRPMI00106");
-
- var instcd = getUserInfo("dutplceinstcd");
-
- model.makeValue("/root/send/data1/sess_posinstcd",instcd);
- submit("TRPMI00405");
-
- model.toggle("inlv");
- cap_ddnm.attribute("left") = "20";
- cap_ddnm.attribute("width") = "90";
- cap_ddnm.text = "입원일자 :";
- model.setValue("/root/main/cond/menuflag", "inlv");
- model.refresh();
-
- fSearch();
- }
- // 방문조회
- function fSearch(){
-
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
-
- switch(model.getValue("/root/main/cond/menuflag")) {
- case "inlv" :
- if(getDateInterval(fromdd, todd) > 2){
- messageBox("조회기간은 3일 이상을 넘을 수", "I004");
- model.setFocus("ipt_todd");
- return;
- }
- fSearchinlv();
- break;
- case "dschlv" :
- if(getDateInterval(fromdd, todd) > 2){
- messageBox("조회기간은 3일 이상을 넘을 수", "I004");
- model.setFocus("ipt_todd");
- return;
- }
- fSearchdschlv();
- break;
- case "testlv" :
- if(getDateInterval(fromdd, todd) > 0){
- messageBox("조회기간은 1일 이상을 넘을 수", "I004");
- model.setFocus("ipt_todd");
- return;
- }
- fSearchtestlv();
- break;
- case "medilv" :
- if(getDateInterval(fromdd, todd) > 2){
- messageBox("조회기간은 3일 이상을 넘을 수", "I004");
- model.setFocus("ipt_todd");
- return;
- }
- fSearchmedilv();
- break;
- default :
- if(getDateInterval(fromdd, todd) > 2){
- messageBox("조회기간은 3일 이상을 넘을 수", "I004");
- model.setFocus("ipt_todd");
- return;
- }
- fSearchinlv();
- break;
-
- }
- }
- // 입원방문조회
- function fSearchinlv(){
-
- model.removeNodeset("/root/main/inlvinfo/inlvlist");
- model.copyNode("/root/send","/root/main/cond");
- submit("TRMNW18000");
- model.refresh();
- }
- // 퇴원방문조회
- function fSearchdschlv(){
-
- model.removeNodeset("/root/main/dschlvinfo/dschlvlist");
- model.copyNode("/root/send","/root/main/cond");
- submit("TRMNW18010");
- model.refresh();
- }
- // 검사대기 방문조회
- function fSearchtestlv(){
-
- model.removeNodeset("/root/main/testlvinfo/testlvlist");
- model.copyNode("/root/send","/root/main/cond");
- submit("TRMNW18020");
- model.refresh();
- }
- // 진료대기 방문조회
- function fSearchmedilv(){
-
- model.removeNodeset("/root/main/medilvinfo/medilvlist");
- model.copyNode("/root/send","/root/main/cond");
- submit("TRMNW18030");
- model.refresh();
- }
- // 방문저장
- function fSave(){
-
- switch(model.getValue("/root/main/cond/menuflag")) {
- case "inlv" :
- fSaveinlv()
- break;
- case "dschlv" :
- fSavedschlv();
- break;
- case "testlv" :
- fSavetestlv();
- break;
- case "medilv" :
- fSavemedilv();
- break;
- default :
- fSaveinlv();
- break;
-
- }
- }
- // 입원방문저장
- function fSaveinlv(){
-
- var inlvinfoHeader = "check▦instcd▦pid▦indd▦cretno▦inrecdd▦inrectm▦wardcd▦bedcd▦roomcd▦roomgrdecd▦orddeptcd▦medispclid▩";
- var inlvinfoData = "";
- var inrecddcnt = 0;
- var inrectmcnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
-
- for(var i = 0 ; i < grd_inlvlist.rows; i++) {
-
- if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xInlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xInlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xInlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno");
- var inrecdd = model.getValue(xInlvListPath+"[" + i + "]/inrecdd");
- var inrectm = model.getValue(xInlvListPath+"[" + i + "]/inrectm");
- var wardcd = model.getValue(xInlvListPath+"[" + i + "]/wardcd");
- var bedcd = model.getValue(xInlvListPath+"[" + i + "]/bedcd");
- var roomcd = model.getValue(xInlvListPath+"[" + i + "]/roomcd");
- var roomgrdecd = model.getValue(xInlvListPath+"[" + i + "]/roomgrdecd");
- var orddeptcd = model.getValue(xInlvListPath+"[" + i + "]/orddeptcd");
- var medispclid = model.getValue(xInlvListPath+"[" + i + "]/medispclid");
-
- if(inrecdd == ""){
- inrecddcnt++;
- }
-
- if(inrectm == ""){
- inrectmcnt++;
- }
- inlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▦"
- + inrecdd +"▦"
- + inrectm +"▦"
- + wardcd +"▦"
- + bedcd +"▦"
- + roomcd +"▦"
- + roomgrdecd +"▦"
- + orddeptcd +"▦"
- + medispclid +"▩";
- }
- }
-
- if(inlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inrecddcnt > 0 || inrectmcnt > 0 ){
- messageBox("방문저장일시를 입력하십시오.","C");
- }else{
- model.makeValue("/root/send/savedata", inlvinfoHeader+inlvinfoData);
- submit("TXMNW18000");
- fSearch() ;
- }
- }
- // 퇴원방문저장
- function fSavedschlv(){
-
- var dschlvinfoHeader = "check▦instcd▦pid▦indd▦cretno▦inrecdd▦inrectm▦wardcd▦bedcd▦roomcd▦roomgrdecd▦orddeptcd▦medispclid▩";
- var dschlvinfoData = "";
- var inrecddcnt = 0;
- var inrectmcnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
-
- for(var i = 0 ; i < grd_dschlvlist.rows; i++) {
-
- if(model.getValue(xDschlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xDschlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xDschlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xDschlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xDschlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xDschlvListPath+"[" + i + "]/cretno");
- var inrecdd = model.getValue(xDschlvListPath+"[" + i + "]/inrecdd");
- var inrectm = model.getValue(xDschlvListPath+"[" + i + "]/inrectm");
- var wardcd = model.getValue(xDschlvListPath+"[" + i + "]/wardcd");
- var bedcd = model.getValue(xDschlvListPath+"[" + i + "]/bedcd");
- var roomcd = model.getValue(xDschlvListPath+"[" + i + "]/roomcd");
- var roomgrdecd = model.getValue(xDschlvListPath+"[" + i + "]/roomgrdecd");
- var orddeptcd = model.getValue(xDschlvListPath+"[" + i + "]/orddeptcd");
- var medispclid = model.getValue(xDschlvListPath+"[" + i + "]/medispclid");
-
- if(inrecdd == ""){
- inrecddcnt++;
- }
-
- if(inrectm == ""){
- inrectmcnt++;
- }
- dschlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▦"
- + inrecdd +"▦"
- + inrectm +"▦"
- + wardcd +"▦"
- + bedcd +"▦"
- + roomcd +"▦"
- + roomgrdecd +"▦"
- + orddeptcd +"▦"
- + medispclid +"▩";
- }
- }
-
- if(dschlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inrecddcnt > 0 || inrectmcnt > 0 ){
- messageBox("방문저장일시를 입력하십시오.","C");
- }else{
- model.makeValue("/root/send/savedata", dschlvinfoHeader+dschlvinfoData);
- submit("TXMNW18010");
- fSearch() ;
- }
- }
- // 검사대기 방문저장
- function fSavetestlv(){
-
- var testlvinfoHeader = "check▦instcd▦pid▦orddd▦cretno▦prcpdd▦prcpno▦inrecdd▦inrectm▦orddeptcd▦centcd▦orddrid▩";
- var testlvinfoData = "";
- var inrecddcnt = 0;
- var inrectmcnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
-
- for(var i = 0 ; i < grd_testlvlist.rows; i++) {
-
- if(model.getValue(xTestlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xTestlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xTestlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xTestlvListPath+"[" + i + "]/pid");
- var orddd = model.getValue(xTestlvListPath+"[" + i + "]/orddd");
- var cretno = model.getValue(xTestlvListPath+"[" + i + "]/cretno");
- var prcpdd = model.getValue(xTestlvListPath+"[" + i + "]/prcpdd");
- var prcpno = model.getValue(xTestlvListPath+"[" + i + "]/prcpno");
- var inrecdd = model.getValue(xTestlvListPath+"[" + i + "]/inrecdd");
- var inrectm = model.getValue(xTestlvListPath+"[" + i + "]/inrectm");
- var orddeptcd = model.getValue(xTestlvListPath+"[" + i + "]/orddeptcd");
- var centcd = model.getValue(xTestlvListPath+"[" + i + "]/centcd");
- var orddrid = model.getValue(xTestlvListPath+"[" + i + "]/orddrid");
- if(inrecdd == ""){
- inrecddcnt++;
- }
-
- if(inrectm == ""){
- inrectmcnt++;
- }
- testlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + orddd +"▦"
- + cretno +"▦"
- + prcpdd +"▦"
- + prcpno +"▦"
- + inrecdd +"▦"
- + inrectm +"▦"
- + orddeptcd +"▦"
- + centcd +"▦"
- + orddrid +"▩";
- }
- }
-
- if(testlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inrecddcnt > 0 || inrectmcnt > 0 ){
- messageBox("방문저장일시를 입력하십시오.","C");
- }else{
- model.makeValue("/root/send/savedata", testlvinfoHeader+testlvinfoData);
- submit("TXMNW18020");
- fSearch() ;
- }
- }
- // 진료대기 방문저장
- function fSavemedilv(){
-
- var medilvinfoHeader = "check▦instcd▦pid▦orddd▦cretno▦inrecdd▦inrectm▦orddeptcd▦centcd▦orddrid▩";
- var medilvinfoData = "";
- var inrecddcnt = 0;
- var inrectmcnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
-
- for(var i = 0 ; i < grd_medilvlist.rows; i++) {
-
- if(model.getValue(xMedilvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xMedilvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xMedilvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xMedilvListPath+"[" + i + "]/pid");
- var orddd = model.getValue(xMedilvListPath+"[" + i + "]/orddd");
- var cretno = model.getValue(xMedilvListPath+"[" + i + "]/cretno");
- var inrecdd = model.getValue(xMedilvListPath+"[" + i + "]/inrecdd");
- var inrectm = model.getValue(xMedilvListPath+"[" + i + "]/inrectm");
- var orddeptcd = model.getValue(xMedilvListPath+"[" + i + "]/orddeptcd");
- var centcd = model.getValue(xMedilvListPath+"[" + i + "]/centcd");
- var orddrid = model.getValue(xMedilvListPath+"[" + i + "]/orddrid");
- if(inrecdd == ""){
- inrecddcnt++;
- }
-
- if(inrectm == ""){
- inrectmcnt++;
- }
- medilvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + orddd +"▦"
- + cretno +"▦"
- + inrecdd +"▦"
- + inrectm +"▦"
- + orddeptcd +"▦"
- + centcd +"▦"
- + orddrid +"▩";
- }
- }
-
- if(medilvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inrecddcnt > 0 || inrectmcnt > 0 ){
- messageBox("방문저장일시를 입력하십시오.","C");
- }else{
- model.makeValue("/root/send/savedata", medilvinfoHeader+medilvinfoData);
- submit("TXMNW18030");
- fSearch() ;
- }
- }
- // 방문저장취소
- function fDel(){
-
- switch(model.getValue("/root/main/cond/menuflag")) {
- case "inlv" :
- fDelinlv();
- break;
- case "dschlv" :
- fDeldschlv();
- break;
- case "testlv" :
- fDeltestlv();
- break;
- case "medilv" :
- fDelmedilv();
- break;
- default :
- fDelinlv();
- break;
-
- }
- }
- // 입원방문저장취소
- function fDelinlv(){
-
- var inlvinfoHeader = "check▦instcd▦pid▦indd▦cretno▩";
- var inlvinfoData = "";
- var inreccnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
- for(var i = 0 ; i < grd_inlvlist.rows; i++) {
-
- if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xInlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xInlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xInlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno");
- var inrecyn = model.getValue(xInlvListPath+"[" + i + "]/inrecyn");
- inlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▩";
-
- if(inrecyn == "N"){
- inreccnt ++ ;
- }
- }
- }
-
- if(inlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inreccnt > 0 ){
- messageBox("방문저장된 건만 방문저장취소가 가능합니다.","C");
- }else{
- model.makeValue("/root/send/savedata", inlvinfoHeader+inlvinfoData);
- submit("TXMNW18001");
- fSearch() ;
- }
- }
- // 퇴원방문저장취소
- function fDeldschlv(){
-
- var dschvinfoHeader = "check▦instcd▦pid▦indd▦cretno▩";
- var dschlvinfoData = "";
- var inreccnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
- for(var i = 0 ; i < grd_dschlvlist.rows; i++) {
-
- if(model.getValue(xDschlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xDschlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xDschlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xDschlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xDschlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xDschlvListPath+"[" + i + "]/cretno");
- var inrecyn = model.getValue(xDschlvListPath+"[" + i + "]/inrecyn");
- dschlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▩";
-
- if(inrecyn == "N"){
- inreccnt ++ ;
- }
- }
- }
-
- if(dschlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inreccnt > 0 ){
- messageBox("방문저장된 건만 방문저장취소가 가능합니다.","C");
- }else{
- model.makeValue("/root/send/savedata", dschvinfoHeader+dschlvinfoData);
- submit("TXMNW18011");
- fSearch() ;
- }
- }
- // 검사대기 방문저장취소
- function fDeltestlv(){
-
- var testvinfoHeader = "check▦instcd▦pid▦orddd▦cretno▦prcpdd▦prcpno▩";
- var testlvinfoData = "";
- var inreccnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
- for(var i = 0 ; i < grd_testlvlist.rows; i++) {
-
- if(model.getValue(xTestlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xTestlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xTestlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xTestlvListPath+"[" + i + "]/pid");
- var orddd = model.getValue(xTestlvListPath+"[" + i + "]/orddd");
- var cretno = model.getValue(xTestlvListPath+"[" + i + "]/cretno");
- var prcpdd = model.getValue(xTestlvListPath+"[" + i + "]/prcpdd");
- var prcpno = model.getValue(xTestlvListPath+"[" + i + "]/prcpno");
- var inrecyn = model.getValue(xTestlvListPath+"[" + i + "]/inrecyn");
- testlvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + orddd +"▦"
- + cretno +"▦"
- + prcpdd +"▦"
- + prcpno +"▩";
-
- if(inrecyn == "N"){
- inreccnt ++ ;
- }
- }
- }
-
- if(testlvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inreccnt > 0 ){
- messageBox("방문저장된 건만 방문저장취소가 가능합니다.","C");
- }else{
- model.makeValue("/root/send/savedata", testvinfoHeader+testlvinfoData);
- submit("TXMNW18021");
- fSearch() ;
- }
- }
- // 진료대기 방문저장취소
- function fDelmedilv(){
-
- var medivinfoHeader = "check▦instcd▦pid▦orddd▦cretno▩";
- var medilvinfoData = "";
- var inreccnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
- for(var i = 0 ; i < grd_medilvlist.rows; i++) {
-
- if(model.getValue(xMedilvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xMedilvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xMedilvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xMedilvListPath+"[" + i + "]/pid");
- var orddd = model.getValue(xMedilvListPath+"[" + i + "]/orddd");
- var cretno = model.getValue(xMedilvListPath+"[" + i + "]/cretno");
- var inrecyn = model.getValue(xMedilvListPath+"[" + i + "]/inrecyn");
- medilvinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + orddd +"▦"
- + cretno +"▩";
-
- if(inrecyn == "N"){
- inreccnt ++ ;
- }
- }
- }
-
- if(medilvinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(inreccnt > 0 ){
- messageBox("방문저장된 건만 방문저장취소가 가능합니다.","C");
- }else{
- model.makeValue("/root/send/savedata", medivinfoHeader+medilvinfoData);
- submit("TXMNW18031");
- fSearch() ;
- }
- }
- function fExcel(){
-
- switch(model.getValue("/root/main/cond/menuflag")) {
- case "inlv" :
- fExcelinlv();
- break;
- case "dschlv" :
- fExceldschlv();
- break;
- case "testlv" :
- fExceltestlv();
- break;
- case "medilv" :
- fExcelmedilv();
- break;
- default :
- fExcelinlv();
- break;
-
- }
- }
- // 입원방문 엑셀저장
- function fExcelinlv(){
-
- var fileName = window.fileDialog("save", ",", false, "입원방문관리_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- var col1 = grd_inlvlist.colRef("wardcd");
- var col2 = grd_inlvlist.colRef("bedcd");
- var col3 = grd_inlvlist.colRef("roomcd");
- var col4 = grd_inlvlist.colRef("roomgrdecd");
- var col5 = grd_inlvlist.colRef("bdtppartcd");
- var col6 = grd_inlvlist.colRef("bdbtype");
- if (fileName != ""){
- grd_inlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;col_"+col5+":label;col_"+col6+":label;", true, false, "", "", false);
- }
- }
- // 퇴원방문 엑셀저장
- function fExceldschlv(){
-
- var fileName = window.fileDialog("save", ",", false, "퇴원방문관리_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- var col1 = grd_dschlvlist.colRef("wardcd");
- var col2 = grd_dschlvlist.colRef("bedcd");
- var col3 = grd_dschlvlist.colRef("roomcd");
- var col4 = grd_dschlvlist.colRef("roomgrdecd");
- if (fileName != ""){
- grd_dschlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;", true, false, "", "", false);
- }
- }
- // 검사대기방문 엑셀저장
- function fExceltestlv(){
-
- var fileName = window.fileDialog("save", ",", false, "검사대기방문관리_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- var col1 = grd_testlvlist.colRef("centcd");
- if (fileName != ""){
- grd_testlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_", true, false, "", "", false);
- }
- }
- // 진료대기방문 엑셀저장
- function fExcelmedilv(){
-
- var fileName = window.fileDialog("save", ",", false, "진료대기방문관리_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- var col1 = grd_medilvlist.colRef("centcd");
- var col2 = grd_medilvlist.colRef("rsrvflag");
- var col3 = grd_medilvlist.colRef("insukind");
- var col4 = grd_medilvlist.colRef("suppkind");
- if (fileName != ""){
- grd_medilvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;", true, false, "", "", false);
- }
- }
- // 간호정보조사 임시저장
- function fNrInfoSave(){
-
- var nrinfoHeader = "check▦instcd▦pid▦indd▦cretno▦recflag▦highbp▦lowbp▦pulse▦breth▦bdtp▦bdtppartcd▦bdht▦bdwt▦spo2▦bdbtype▩";
- var nrinfoData = "";
- var recflagcnt = 0;
- var signinfoyncnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
-
- for(var i = 0 ; i < grd_inlvlist.rows; i++) {
-
- if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){
-
- var check = model.getValue(xInlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xInlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xInlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno");
- var recflag = model.getValue(xInlvListPath+"[" + i + "]/recflag");
- var highbp = model.getValue(xInlvListPath+"[" + i + "]/highbp");
- var lowbp = model.getValue(xInlvListPath+"[" + i + "]/lowbp");
- var pulse = model.getValue(xInlvListPath+"[" + i + "]/pulse");
- var breth = model.getValue(xInlvListPath+"[" + i + "]/breth");
- var bdtp = model.getValue(xInlvListPath+"[" + i + "]/bdtp");
- var bdtppartcd = model.getValue(xInlvListPath+"[" + i + "]/bdtppartcd");
- var bdht = model.getValue(xInlvListPath+"[" + i + "]/bdht");
- var bdwt = model.getValue(xInlvListPath+"[" + i + "]/bdwt");
- var spo2 = model.getValue(xInlvListPath+"[" + i + "]/spo2");
- var bdbtype = model.getValue(xInlvListPath+"[" + i + "]/bdbtype");
- var signinfoyn = model.getValue(xInlvListPath+"[" + i + "]/signinfoyn");
-
-
- if(recflag == ""){
- recflagcnt++;
- }
-
- if(signinfoyn == "Y"){
- signinfoyncnt++;
- }
- nrinfoData += check +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▦"
- + recflag +"▦"
- + highbp +"▦"
- + lowbp +"▦"
- + pulse +"▦"
- + breth +"▦"
- + bdtp +"▦"
- + bdtppartcd +"▦"
- + bdht +"▦"
- + bdwt +"▦"
- + spo2 +"▦"
- + bdbtype +"▩";
- }
- }
-
- if(nrinfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(signinfoyncnt > 0 ){
- messageBox("이미 인증저장된 건은 저장 또는 수정이 불가 합니다.","E");
- }else if(recflagcnt > 0 ){
- messageBox("간호정보조사지 종류를 선택하십시오.","C");
- }else{
- model.makeValue("/root/send/savedata", nrinfoHeader+nrinfoData);
- submit("TXMNW18002");
- fSearch() ;
- }
- }
- // 입실저장
- function fSaveInroom(){
-
- var inroominfoHeader = "check▦stat▦inrmcnfmflag▦saveId▦chngdeptroomflag▦instcd▦pid▦indd▦cretno▦wardcd▦bedcd▦roomcd▦roomgrdecd▦orddeptcd▦ordtype▦patnm▦sexage▦toward▦toroom▦chngorddeptcd▦chngatdoctid▦atdoctnm▦atdoctidphonno▦medispclid▦orddrnm▦medispclphonno▦tocntctel▦curdd▦curtm▦userid▦usernm▩";
- var inroominfoData = "";
- var careinrmddcnt = 0 ;
- var inddcnt = 0;
- var checkcnt = 0;
- var userdeptcd = getUserInfo("dutplcecd");
-
- for(var i = 0 ; i < grd_inlvlist.rows; i++) {
-
- if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){
-
- checkcnt++;
-
- if(checkcnt > 1) {
- messageBox("입실저장은 1건만 가능합니다.","E");
- return;
- }
-
-
- var check = model.getValue(xInlvListPath+"[" + i + "]/check");
- var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd");
- var pid = model.getValue(xInlvListPath+"[" + i + "]/pid");
- var indd = model.getValue(xInlvListPath+"[" + i + "]/indd");
- var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno");
- var wardcd = model.getValue(xInlvListPath+"[" + i + "]/wardcd");
- var bedcd = model.getValue(xInlvListPath+"[" + i + "]/bedcd");
- var roomcd = model.getValue(xInlvListPath+"[" + i + "]/roomcd");
- var roomgrdecd = model.getValue(xInlvListPath+"[" + i + "]/roomgrdecd");
- var orddeptcd = model.getValue(xInlvListPath+"[" + i + "]/orddeptcd");
- var ordtype = model.getValue(xInlvListPath+"[" + i + "]/ordtype");
- var patnm = model.getValue(xInlvListPath+"[" + i + "]/hngnm");
- var careinrmdd = model.getValue(xInlvListPath+"[" + i + "]/careinrmdd");
- var toward = grd_inlvlist.labelMatrix(grd_inlvlist.row, grd_inlvlist.colRef("wardcd"));
- var toroom = grd_inlvlist.labelMatrix(grd_inlvlist.row, grd_inlvlist.colRef("roomcd"));
- var chngorddeptcd= model.getValue(xInlvListPath+"[" + i + "]/wardcd");
- var chngatdoctid = model.getValue(xInlvListPath+"[" + i + "]/atdoctid");
- var atdoctnm = model.getValue(xInlvListPath+"[" + i + "]/atdoctnm");
- var atdoctidphonno = model.getValue(xInlvListPath+"[" + i + "]/atdoctidphonno");
- var medispclid = model.getValue(xInlvListPath+"[" + i + "]/medispclid");
- var orddrnm = model.getValue(xInlvListPath+"[" + i + "]/orddrnm");
- var medispclphonno = model.getValue(xInlvListPath+"[" + i + "]/medispclphonno");
- var tocntctel = model.getValue(xInlvListPath+"[" + i + "]/tocntctel");
- var stat = "u";
- var chngdeptroomflag = "01";
- var saveId = "SMMNW18000";
- var sexage = model.getValue(xInlvListPath+"[" + i + "]/sex") + "/" + model.getValue(xInlvListPath+"[" + i + "]/age");
- var curdd = getCurrentDate();
- var curtm = getCurrentTime().substr(0,4);
- var userid = getUserId();
- var usernm = getUserName();
- var ordflag = "01";
- var inrmcnfmflag = "U";
-
-
- if(careinrmdd != "-"){
- careinrmddcnt++;
- }
-
- if(indd != getCurrentDate()){
- inddcnt++;
- }
-
- inroominfoData += check +"▦"
- + stat +"▦"
- + inrmcnfmflag +"▦"
- + saveId +"▦"
- + chngdeptroomflag +"▦"
- + instcd +"▦"
- + pid +"▦"
- + indd +"▦"
- + cretno +"▦"
- + wardcd +"▦"
- + bedcd +"▦"
- + roomcd +"▦"
- + roomgrdecd +"▦"
- + orddeptcd +"▦"
- + ordtype +"▦"
- + patnm +"▦"
- + sexage +"▦"
- + toward +"▦"
- + toroom +"▦"
- + chngorddeptcd +"▦"
- + chngatdoctid +"▦"
- + atdoctnm +"▦"
- + atdoctidphonno +"▦"
- + medispclid +"▦"
- + orddrnm +"▦"
- + medispclphonno +"▦"
- + tocntctel +"▦"
- + curdd +"▦"
- + curtm +"▦"
- + userid +"▦"
- + usernm +"▩";
- }
- }
-
- if(inroominfoData == "") {
- messageBox("선택된 내역이", "I004");
- return;
- }else if(careinrmddcnt > 0 ){
- messageBox("이미 입실저장된 건은 저장이 불가합니다.","E");
- }else if(inddcnt > 0 ){
- messageBox("당일 입원환자에 대해서만 입실저장이", "I006","\입원일자를 확인하십시오.","E");
- }else{
- model.makeValue("/root/send/savedata", inroominfoHeader+inroominfoData);
- model.removenode("/root/main/rtninfo");
- if(submit("TXMNW18003")== true){
- var sMessage = "";
- sMessage = model.getValue("/root/main/rtninfo/patinfolist/pid") + " "
- + model.getValue("/root/main/rtninfo/patinfolist/patnm") + " "
- + model.getValue("/root/main/rtninfo/patinfolist/sexage") + " "
- + "입실등록되었습니다." ;
- if(model.getValue("/root/main/rtninfo/rtnmsg/resultflag") == "2") {
- sMessage += "\n\n입원전 검사실에서 미액팅된 검사가 존재합니다.\n입원전 검사실에 확인하십시오!!";
- }
-
- messageBox(sMessage, "I");
-
- }
- fSearch() ;
- }
- }
|