123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924 |
- /************************************************************************************************************************************************************
- * 전문간호 메인 (SMMNS00100.xrw - JScript )
- * - Version :
- * 1) : Ver.1.00.01
- * 2) : Ver.2.00
- ************************************************************************************************************************************************************/
-
- var xEdupatlistPath = '/root/main/edupatinfo/edupatlist'; //교육환자리스트
- var xIninfolistPath = '/root/main/ininfo/ininfolist'; //환자예약정보리스트
- var xItemPath = '/root/main/item/patinfo'; //환자상세정보
-
- var suppdeptcd = '';//메뉴그룹에 등록된 사용부서코드
- var suppdeptnm = '';//메뉴그룹에 등록된 사용부서명
-
- // emr.mnwmcode
- // cdgrupid 022, 023, 024
- // 022 : 전문분야리스트 (grupdetldesc : R <- 의뢰데이터구분)
- // 023 : 전문간호팀코드
- // 024 : 전문간호겸업부서 (상처/장요루)
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 화면초기화
- ***********************************************************************************************************************************************************/
- function fInit(){
-
- //20090205 dhkim
- //전문간호/BMT전문간호 로 나눠지게 되면서 사용부서에 해당하는 분야로 각각 등록됨.
- suppdeptcd = aezfSetSuppDeptcd();//메뉴그룹에 등록된 사용부서코드
-
- //20090522 dhkim 메뉴사용처명 조회
- suppdeptnm = getMenuDeptnm('/root/send/deptcd', suppdeptcd, 'TRMNI02031', '/root/temp/menudeptinfo/deptnm');
-
- fSpclCareSearch(suppdeptcd); //전문분야를 조회한다.
- fSetSearchDate(); //조회 기준일자 setting
-
- fSpclNursDeptSearch();//간호에 등록된 전문분야 정보를 임시노드에 조회해 온다.
- fSpcltemCodeSearch(); //간호에 등록된 전문간호팀코드 정보를 임시노드에 조회해 온다.
- fSpclSideJobSearch(); //간호에 등록된 전문간호겸업부서 정보를 임시노드에 조회해 온다.
-
- cmb_spcl.select(0); //전문분야의 콤보 제일 첫번째로 선택된 상태
- }
-
-
- //초기정보조회(전문분야, 공통코드)
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 전문분야 코드및 명칭을 조회한다.
- ***********************************************************************************************************************************************************/
- function fSpclCareSearch(suppdeptcd){
-
- //20090205 dhkim
- //전문간호/BMT전문간호 로 나눠지게 되면서 사용부서에 해당하는 분야로 각각 등록됨.
- model.removenode('/root/send');
- model.makeValue('/root/send/suppdeptcd', suppdeptcd);
-
- model.removenode('root/hidden/spclcarefildflaginfo');
- model.makenode('root/hidden/spclcarefildflaginfo');
-
- if(!submit('TRMNS00107')){
- messageBox('전문분야기준자료 조회를 실패하였습니다.', 'E999');
- return false;
- }
- }
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 간호에 등록된 전문분야 정보
- ***********************************************************************************************************************************************************/
- function fSpclNursDeptSearch(){
-
- //20090116 dhkim
- //간호에 등록된 전문분야 정보를 임시노드에 조회해 온다.
- //간호 테이블에 등록된 조회정보
- //전문분야코드 : 022, 전문간호팀코드 : 023
- model.removenode('/root/send');
- model.makeValue('/root/send/cdgrupid', '022');
-
- model.removenode('/root/hidden/nursdeptinfo');
- model.makenode('/root/hidden/nursdeptinfo');
- if(!submit('TRMNS00108')){
- messageBox('간호에 등록된 전문분야정보를 조회를 실패하였습니다.', 'E999');
- return false;
- }
- }
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 전문간호팀코드 정보
- ***********************************************************************************************************************************************************/
- function fSpcltemCodeSearch(){
- //20090119 dhkim
- //간호에 등록된 전문간호팀코드 정보를 임시노드에 조회해 온다.
- //간호 테이블에 등록된 조회정보
- //전문분야코드 : 022, 전문간호팀코드 : 023
- model.removenode('/root/send');
- model.makeValue('/root/send/cdgrupid', '023');
-
- model.removenode('/root/hidden/spclteaminfo');
- model.makenode('/root/hidden/spclteaminfo');
- if(!submit('TRMNS00109')){
- messageBox('간호에 등록된 전문분야정보를 조회를 실패하였습니다.', 'E999');
- return false;
- }
- }
-
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 전문간호겸업부서 정보
- ***********************************************************************************************************************************************************/
- function fSpclSideJobSearch(){
- //20090128 dhkim
- //간호에 등록된 전문간호겸업부서 정보를 임시노드에 조회해 온다.
- //간호 테이블에 등록된 조회정보
- //전문분야코드 : 022, 전문간호팀코드 : 023, 전문간호겸업부서코드 : 024
- model.removenode('/root/send');
- model.makeValue('/root/send/cdgrupid', '024');
-
- model.removenode('/root/hidden/spclsideinfo');
- model.makenode('/root/hidden/spclsideinfo');
- if(!submit('TRMNS00110')){
- messageBox('간호에 등록된 전문분야겸업부서정보 조회를 실패하였습니다.', 'E999');
- return false;
- }
- }
-
-
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2007.05.16
- * @by : 정경화
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회일자 Setting
- * @param :
- * @return :
- ***********************************************************************************************************************************************************/
- function fSetSearchDate(){
- //var sdate = curdate.toDate('YYYYMMDD').getAddDate(-7, "D").getDateFormat('YYYYMMDD');//일주일전..dateHelper.js참고
-
- //20090521 dhkim 변경요청 전일~당일로
- ipt_Fromdd.value = getCurrentDate().toDate('YYYYMMDD').getAddDate(-1, "D").getDateFormat('YYYYMMDD');//하루전
- //ipt_Fromdd.value = getCurrentDate();
- ipt_Enddd.value = getCurrentDate();
- }
-
- /***********************************************************************************************************************************************************
- * 환자정보에 대한 인풋 컴포넌트를 disabled 시킨다.
- * 신규등록시에만 예약사유, remark를 수정상태로 변경
- * 20090522 dhkim
- * remark는 수정가능함. (변경개발요청 itc김숙인)
- ************************************************************************************************************************************************************/
- function fPatInfoAreaDisabled(isNew){
-
- //isNew가 true 경우에만 입력가능상태로 만들어준다.
- if(isNew){
- ipt_reqdd.disabled = false;//의뢰일자
- tar_remark.disabled = false;//Remark
- ipt_reqresn.disabled = false;//예약사유
- btn_PSave.disabled = false;//환자정보조회저장버튼
- cmb_glytype.disabled = false;//당뇨유형
- ipt_rervdd.disabled = false;//예약일자
- ipt_rervtm.disabled = false;//예약시간
- }else{
- ipt_reqdd.disabled = true;//의뢰일자
-
- //remark는 수정가능함. (변경개발요청 itc김숙인)
- //tar_remark.disabled = true;//Remark
- tar_remark.disabled = false;//Remark
-
- ipt_reqresn.disabled = true;//예약사유
-
- //remark는 수정가능함. (변경개발요청 itc김숙인)
- //btn_PSave.disabled = true;//환자정보조회저장버튼
- btn_PSave.disabled = false;//환자정보조회저장버튼
-
- cmb_glytype.disabled = true;//당뇨유형
- ipt_rervdd.disabled = true;//예약일자
- ipt_rervtm.disabled = true;//예약시간
- }
- model.refresh();
- }
-
-
- //메인조회(메인, 예약정보, 상세정보)
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2007.05.08
- * @by : 정경화
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호메인 환자리스트조회(의뢰일)
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSearchMainList(){
-
- var sdate = ipt_Fromdd.value;
- var edate = ipt_Enddd.value;
- if(sdate == '' || !isValidDateTime(sdate)){
- sdate = getCurrentDate();
- }
- if(edate == '' || !isValidDateTime(edate)){
- edate = getCurrentDate();
- }
- ipt_Fromdd.value= sdate;
- ipt_Enddd.value = edate;
-
- var spcl = model.getValue("/root/cond/spcl");
- var rgstflag = '';
- var deptflag = '';
- var deptcd = '';
- var reqyn = 'f';
- var nodesetCnt = getNodesetCount('/root/hidden/nursdeptinfo/nursdeptlist');
- for(var i = 1; i <= nodesetCnt; i++){
- deptflag = model.getValue('/root/hidden/nursdeptinfo/nursdeptlist[' + i + ']/deptflag');
- deptcd = model.getValue('/root/hidden/nursdeptinfo/nursdeptlist[' + i + ']/deptcd');
- if(deptflag == 'R' && deptcd == spcl){
- reqyn = 't';
- break;
- }
- }
-
- if(reqyn == 't'){
- rgstflag = 'R';
- }else{
- rgstflag = 'E';
- }
-
- //20090128 전문분야중 겸업인 부서를 찾는다.
- spcl = fMakeSpclSideQuery(spcl);
-
- model.removeNodeset(xEdupatlistPath); //메인그리드
- model.removeNodeset(xItemPath); //환자상세정보
- model.removeNodeset(xIninfolistPath); //환자예약정보
- model.removenode("/root/send");
- model.makeNode("/root/send");
-
- model.makeValue("/root/send/spcl", spcl);
- model.makeValue("/root/send/ddflag", model.getValue("/root/cond/ddflag"));
- model.makeValue("/root/send/fromdd", model.getValue("/root/cond/fromdd"));
- model.makeValue("/root/send/enddd", model.getValue("/root/cond/enddd"));
- model.makeValue("/root/send/stat", model.getValue("/root/cond/stat"));
- model.makeValue("/root/send/patfg", model.getValue("/root/cond/patfg"));
- model.makeValue("/root/send/pid", model.getValue("/root/cond/pid"));
- model.makeValue("/root/send/patnm", model.getValue("/root/cond/patnm"));
- model.makeValue("/root/send/rgstflag", rgstflag);
-
- //20090121 dhkim
- //전문간호팀 코드
- //model.makeValue("/root/send/spclteamcd", model.getValue("/root/hidden/spclteaminfo/spclteamlist/deptcd"));
-
- //20090205 dhkim
- //전문간호/BMT전문간호 로 나눠지게 되면서 사용부서에 해당하는 분야로 각각 등록됨.
- model.makeValue("/root/send/spclteamcd", suppdeptcd);
-
-
- if(!submit("TRMNS00101")){
- messageBox('전문간호환자 조회를', 'E009');
- return false;
- }else{
-
- //그리드의 일자구분을 조회구간에 맞게 캡션을 변경
-
- if(rdo_ddflag.value == "R"){
- grd_edupatlist.valueMatrix(0,7)="의뢰일";
- }else if(rdo_ddflag.value == "O"){
- grd_edupatlist.valueMatrix(0,7)="처방일";
- }else if(rdo_ddflag.value == "S"){
- grd_edupatlist.valueMatrix(0,7)="처방/의뢰일";
- }else if(rdo_ddflag.value == "A"){
- grd_edupatlist.valueMatrix(0,7)="수행일";
- }
-
- //검사처방데이터(O)는 확인,수행 수정 할 수 없다.
- //수행,확인은 당뇨, 신경과, 유방센터 전문간호사의 경우 (검사처방데이터) 기능검사화면에서 실시체크 하므로 막아줄것..
- //(rgstflag) -> R :의뢰 , O :검사처방, N :신규, E : 교육처방
- for(var i = 1 ; i <= grd_edupatlist.rows ; i++ ){
- //alert('i=' + i + ' rgstflag =' + model.getValue(xEdupatlistPath + '[' + i + ']/rgstflag'));
- rgstflag = model.getValue(xEdupatlistPath + '[' + i + ']/rgstflag');
-
- if(rgstflag == 'O'){
- grd_edupatlist.isReadOnly(i, 14) = true;
- grd_edupatlist.isReadOnly(i, 15) = true;
- }else{
- grd_edupatlist.isReadOnly(i, 14) = false;
- grd_edupatlist.isReadOnly(i, 15) = false;
- }
- }
-
- //환자정보조회 영역 disabled처리
- model.resetInstanceNode(xItemPath);
- fPatInfoAreaDisabled();
-
- }
-
- }
-
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2007.05.22
- * @by : 정경화
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호 환자별 예약정보 조회
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSearchReserv(){
- model.removeNodeset(xIninfolistPath);
- var iRow = grd_edupatlist.row;
- var iCol = grd_edupatlist.col;
-
- //20090128 dhkim
- //전문간호 겸업부서 코딩 수정
- var spcl = model.getValue('/root/cond/spcl');
- spcl = fMakeSpclSideQuery(spcl);
-
- model.makeValue("/root/send/inpid/pid", model.getValue(xEdupatlistPath + '[' + iRow + ']/pid'));
- model.makeValue("/root/send/inpid/reqdd", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdd'));
- model.makeValue('/root/send/inpid/spcl', spcl);
-
- if(!submit("TRMNS00103")){
- messageBox('전문간호환자 예약정보조회를', 'E009');
- return false;
- }else{
- model.refresh();
- }
- //확인, 수행된 데이터는 예약일시를 바꿀수 없다.
- for(var i = 1 ; i < grd_InPidList.rows ; i++ ){
- if((grd_InPidList.valueMatrix(i,1) == "미수행")||(grd_InPidList.valueMatrix(i,1) == "수행")){
- grd_InPidList.isReadOnly(i, 4) = true;
- grd_InPidList.isReadOnly(i, 5) = true;
- }
- }
-
-
- }
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2008.04.22
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 대상자리스트 그리드의 확인여부에 따라 예약정보의 행추가/ 행삭제 버튼을 활성화 또는 비활성화 처리한다.
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fControlRsrvButton(){
-
- var iRow = grd_edupatlist.row;
- if(model.getValue(xEdupatlistPath + '[' + iRow + ']/comdd') == 'true'){
- btn_addrow.disabled = false;
- btn_delrow.disabled = false;
- btn_rsrvsave.disabled = false;
- }else{
- btn_addrow.disabled = true;
- btn_delrow.disabled = true;
- btn_rsrvsave.disabled = true;
- }
-
- model.refresh();
-
- }
-
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2007.05.16
- * @by : 정경화
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호 환자상세정보 조회
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSearchPatDetail(){
-
- iRow = grd_edupatlist.row;
-
- model.removeNodeset("/root/send");
- model.removeNodeset(xItemPath);
-
- model.makeValue("/root/send/pid", model.getValue(xEdupatlistPath + '[' + iRow + ']/pid'));//등록번호
- model.makeValue("/root/send/spcl", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdetlflag'));//전문분야
- model.makeValue("/root/send/rervdd", model.getValue(xEdupatlistPath + '[' + iRow + ']/prerervdd'));//예약일자
- model.makeValue("/root/send/formrecseq",model.getValue(xEdupatlistPath + '[' + iRow + ']/formrecseq'));//서식기록순번
- model.makeValue("/root/send/prcpdd", model.getValue(xEdupatlistPath + '[' + iRow + ']/prcpdd'));//처방일자
- model.makeValue("/root/send/prcpno", model.getValue(xEdupatlistPath + '[' + iRow + ']/prcpno'));//처방일련번호
- model.makeValue("/root/send/prcphistno",model.getValue(xEdupatlistPath + '[' + iRow + ']/prcphistno'));//처방이력번호
- model.makeValue("/root/send/seqno", model.getValue(xEdupatlistPath + '[' + iRow + ']/seqno'));//순번
-
- model.makeValue("/root/send/ddflag", model.getValue("/root/cond/ddflag"));
- model.makeValue("/root/send/fromdd", model.getValue("/root/cond/fromdd"));
- model.makeValue("/root/send/enddd", model.getValue("/root/cond/enddd"));
-
- model.makeValue("/root/send/reqdd", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdd'));
- model.makeValue("/root/send/rervtm", model.getValue(xEdupatlistPath + '[' + iRow + ']/rervtmyn'));
- model.makeValue("/root/send/reqdrid", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdrid'));
- model.makeValue("/root/send/reqnursid", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqnursid'));
- model.makeValue("/root/send/reqdrnm", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdrnm'));
- model.makeValue("/root/send/reqnursnm", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqnursnm'));
- model.makeValue("/root/send/reqdeptcd", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdeptcd'));
- model.makeValue("/root/send/reqdeptnm", model.getValue(xEdupatlistPath + '[' + iRow + ']/reqdeptnm'));
-
- //20090522 dhkim 등록구분추가
- model.makeValue("/root/send/rgstflag", model.getValue(xEdupatlistPath + '[' + iRow + ']/rgstflag'));
-
- if(!submit("TRMNS00102")){
- messageBox('환자 상세정보조회를', 'E009');
- return false;
- }else{
- fPatInfoAreaDisabled();
- }
-
- }
-
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2008.02.28
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 메인의 확인,수행처리
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSaveMainList(){
-
- model.removenode("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- var savedata = grd_edupatlist.getUpdateDataAll('i');
- model.setValue('/root/send/savedata', savedata);
-
- if(submit("TXMNS00101")){
-
- btn_select.dispatch("DOMActivate");//저장 후 재조회
- }else{
- messageBox('확인 및 수행처리를', 'E009');
- return false;
- }
- }
-
-
-
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2008.02.28
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 추가예약 grid 행추가 버튼 클릭시 호출.
- * 메인리스트의 선택한 환자정보를 그리드 행추가시 예약정보에 반영
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fAddRowReservGrid(){
-
- aRow = grd_edupatlist.row;
-
- if(model.getValue(xEdupatlistPath + "[" + aRow + "]/pid") == ""){
- messageBox("예약추가할 환자를 ","C002");
- return false;
- }else{
-
- var cnt = grd_InPidList.row;
- var seqno = 0;
-
- //행추가 했을때 grd_InPidList에 count가 없으면 맨 첫번째값은 grd_edupatlist의 seqno를 대입
- if(cnt < 1){
- seqno = model.getValue(xEdupatlistPath + '[' + aRow + ']/seqno');
- }
-
- //예약정보그리드 행추가
- grd_InPidList.addItem();
-
- //대상자리스트의 정보를 예약정보그리드에 반영
- //model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/stat', model.getValue(xEdupatlistPath + '[' + aRow + ']/stat'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/pid', model.getValue(xEdupatlistPath + '[' + aRow + ']/pid'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/reqdd', model.getValue(xEdupatlistPath + '[' + aRow + ']/reqdd'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/reqdetlflag', model.getValue(xEdupatlistPath + '[' + aRow + ']/reqdetlflag'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/seqno', seqno);
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/patfg', model.getValue(xEdupatlistPath + '[' + aRow + ']/patfg'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/rgstflag', model.getValue(xEdupatlistPath + '[' + aRow + ']/rgstflag'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/reqdeptcd', model.getValue(xEdupatlistPath + '[' + aRow + ']/reqdeptcd'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/reqdrid', model.getValue(xEdupatlistPath + '[' + aRow + ']/reqdrid'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/reqnursid', model.getValue(xEdupatlistPath + '[' + aRow + ']/reqnursid'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/orddd', model.getValue(xEdupatlistPath + '[' + aRow + ']/orddd'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/cretno', model.getValue(xEdupatlistPath + '[' + aRow + ']/cretno'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/prerervdd', model.getValue(xEdupatlistPath + '[' + aRow + ']/prerervdd'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/formrecseq', model.getValue(xEdupatlistPath + '[' + aRow + ']/formrecseq'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/prcpdd', model.getValue(xEdupatlistPath + '[' + aRow + ']/prcpdd'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/prcpno', model.getValue(xEdupatlistPath + '[' + aRow + ']/prcpno'));
- model.setValue(xIninfolistPath + '[' + grd_InPidList.row + ']/prcphistno', model.getValue(xEdupatlistPath + '[' + aRow + ']/prcphistno'));
-
- model.refresh();
- }
-
- }
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2008.02.28
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 추가예약 grid 행삭제 버튼 클릭시 호출.
- * 예약정보그리드의 삭제할 행을 선택함에 따라 row가 신규상태(i)면 그리드에서 삭제,
- * row가 수정상태(u)면 그리드에 D상태로 표시.
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fDeleteRowReservGrid(){
-
- var curRow = grd_InPidList.row;
-
- if(curRow > -1){
-
- if(grd_InPidList.rows < 2){
- return false;
- }
-
- if((grd_InPidList.valueMatrix(curRow,1) == "수행")){
- messageBox("수행상태인 예약은 삭제 ","E001");
- return;
- }
-
- if(grd_InPidList.rowStatus(curRow) == 1){
- grd_InPidList.deleteItem(curRow);
- }else if(grd_InPidList.rowStatus(curRow) == 0){
- grd_InPidList.addStatus(curRow, "delete");
- }
- }
- }
-
- /************************************************************************************************************************************************************
- * @group :
- * @ver : 2008.02.28
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호 환자예약 입력/수정/삭제 처리
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSaveReserv(){
-
- model.removenode("/root/send/savedata");
- model.makeNode("/root/send/savedata");
-
- for(var i = 1 ; i < grd_InPidList.rows ; i++ ){
-
- if(grd_InPidList.rowStatus(i) == 1){
- if(model.getValue(xIninfolistPath +'[' + i + ']/rervdd').length != 8){
- messageBox("환자예약정보의 예약일자는 ","I003");
- return false;
- }
-
- if(model.getValue(xIninfolistPath +'[' + i + ']/rervtm').length != 4){
- messageBox("환자예약정보의 예약시간은 ","I003");
- return false;
- }
- }
- }
-
- var savedata = grd_InPidList.getUpdateData();
- model.setValue('/root/send/savedata', savedata);
-
- if(submit("TXMNS00102")){
- btn_select.dispatch("DOMActivate");//저장 후 재조회
- }else{
- messageBox('환자예약정보의 저장을', 'E009');
- return false;
- }
- }
-
-
-
- /*************************************************************************************************************************************************************
- * @group :
- * @ver : 2007.09.10
- * @by : 하재륜
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호 환자 신규등록/예약 저장
- * //20090522 dhkim remark수정가능(변경요청 itc김숙인)
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fSaveNewPatient(){
-
- var rgstflag = model.getValue('/root/main/item/patinfo/rgstflag');
-
- //if(rgstflag != 'R' && (ipt_rervdd.value.length != 8 || ipt_rervtm.value.length != 4)){
- //messageBox("예약일자/시간은 ","I003");
- //return false;
- //}else{
-
- model.removenode("/root/send");
- model.makeValue("/root/send/stat", "입력");
- model.makeValue("/root/send/pid", model.getValue(xItemPath +"/pid")); // 등록번호
-
- var patfg = model.getValue(xItemPath +"/patfg");
- if(patfg == "입원"){
- patfg = "I";
- }else if(patfg=="외래"){
- patfg = "O";
- }
-
- var cretno = model.getValue(xItemPath + "/cretno");
-
- if(cretno != null){
- cretno = 0;
- }
-
- model.makeValue("/root/send/patfg" , patfg); //구분
- model.makeValue("/root/send/reqdd" , getCurrentDate()); //의뢰일자
- model.makeValue("/root/send/glutype" , model.getValue(xItemPath + "/glutype")); //당뇨유형
- model.makeValue("/root/send/rervdd" , model.getValue(xItemPath + "/rervdd")); //예약일자
- model.makeValue("/root/send/rervtm" , model.getValue(xItemPath + "/rervtm")); //예약시간
-
- //20090522 dhkim 하드코딩수정
- //model.makeValue("/root/send/reqdeptcd" , '3043900000'); //의뢰과(전문간호팀)
- model.makeValue("/root/send/reqdeptcd" , suppdeptcd); //의뢰과(전문간호팀)
-
- model.makeValue("/root/send/reqnursid" , getUserId()); //의뢰과(전문간호팀)
- model.makeValue("/root/send/reqdetlflag" , model.getValue("/root/cond/spcl")); //전문분야구분
- model.makeValue("/root/send/reqresn" , model.getValue(xItemPath + "/reqresn")); //의뢰사유
- model.makeValue("/root/send/remark" , model.getValue(xItemPath + "/remark")); //remark
- model.makeValue("/root/send/rgstflag" , "N"); //등록구분(신규)
- model.makeValue("/root/send/orddd" , model.getValue(xItemPath + "/indd")); //입원진료일자
- model.makeValue("/root/send/cretno" , cretno); //생성번호
-
- //20090522 dhkim remark수정가능(변경요청 itc김숙인)
- model.makeValue("/root/send/fromdd" , model.getValue(xItemPath + "/fromdd")); //관리시작일
-
- if(submit("TXMNS00104")){
- btn_select.dispatch("DOMActivate");//저장 후 재조회
- }else{
- //messageBox('신규환자등록을', 'E009');
- //20090522 dhkim remark수정추가로 메세지변경
- messageBox('환자상세정보 저장을', 'E009');
-
- return false;
- }
- //}
-
- }
-
- /***********************************************************************************************************************************************************
- * @group :
- * @ver : 2008.02.28
- * @by : dhkim
- * @---------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전문간호 환자 신규등록을 위한 팝업을 띄워 환자를 선택한 결과를 환자 상세 정보에 세팅한다.
- * @param :
- * @return :
- ************************************************************************************************************************************************************/
- function fChoicePopNewPatient(){
-
- var pid = model.getValue("/root/main/item/patinfo/pid");
- var fromdd = model.getValue("/root/cond/fromdd");
- var enddd = model.getValue("/root/cond/enddd");
-
- //인스턴스 초기화
- model.removenode('/root/main/item');
- model.makeNode(xItemPath + '/newyn');
- model.makeNode(xItemPath + '/pid');
- model.makeNode(xItemPath + '/pidnm');
- model.makeNode(xItemPath + '/age');
- model.makeNode(xItemPath + '/resno');
- model.makeNode(xItemPath + '/telno1');
- model.makeNode(xItemPath + '/telno2');
- model.makeNode(xItemPath + '/addr1');
- model.makeNode(xItemPath + '/addr2');
- model.makeNode(xItemPath + '/reqdd');
- model.makeNode(xItemPath + '/rervdd');
- model.makeNode(xItemPath + '/rervtm');
- model.makeNode(xItemPath + '/edudd');
- model.makeNode(xItemPath + '/lastedudd');
- model.makeNode(xItemPath + '/patfg');
- model.makeNode(xItemPath + '/wardno');
- model.makeNode(xItemPath + '/reqdeptcd');
- model.makeNode(xItemPath + '/reqdrid');
- model.makeNode(xItemPath + '/reqnursid');
- model.makeNode(xItemPath + '/reqdeptnm');
- model.makeNode(xItemPath + '/reqdrnm');
- model.makeNode(xItemPath + '/reqnursnm');
- model.makeNode(xItemPath + '/glutype');
- model.makeNode(xItemPath + '/ordnm');
- model.makeNode(xItemPath + '/reqresn');
- model.makeNode(xItemPath + '/remark');
- model.makeNode(xItemPath + '/actyn');
- model.makeNode(xItemPath + '/rsrvpidyn');
- model.makeNode(xItemPath + '/cretno');
- model.makeNode(xItemPath + '/indd');
-
- // 환자등록 및 조회 Clear
- model.resetInstanceNode(xItemPath);
- fPatInfoAreaDisabled(true);
- model.refresh();
-
- // 환자정보 조회 팝업 호출
- fPopPatient("2", xItemPath, pid, fromdd, enddd);
-
- //2007.12.10 의뢰과는 전문간호팀(3043900000)으로, 의뢰간호사는 세션정보의 사용자 아이디, 사용자명을 insert한다.
- var userid = getUserInfo("userid");
- var usernm = getUserInfo("usernm");
-
- //20090522 dhkim 하드코딩수정 suppdeptcd, suppdeptnm
- //model.setValue(xItemPath + '/reqdeptcd', '3043900000'); //의뢰과코드
- //model.setValue(xItemPath + '/reqdeptnm', '전문간호팀'); //의뢰과명
- model.setValue(xItemPath + '/reqdeptcd', suppdeptcd); //의뢰과코드
- model.setValue(xItemPath + '/reqdeptnm', suppdeptnm); //의뢰과명
-
- model.setValue(xItemPath + '/reqnursid', userid); //의뢰간호사코드
- model.setValue(xItemPath + '/reqnursnm', usernm); //의뢰간호사명
- model.setValue(xItemPath + '/reqdd"', getCurrentDate());
-
- if(model.getValue("/root/main/item/patinfo/pid")==""){
- model.resetInstanceNode(xItemPath);
- fPatInfoAreaDisabled();
- }
-
- model.refresh();
- }
-
-
-
- //부가기능(협진링크, 기능검사메인링크, 환자 조회팝업링크, 엑셀, 등록대상자)
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 협진관리 링크
- * rgstflag = R인 것만 → 전문간호구분(의뢰:R, 신규:N, 교육처방:E, 검사처방:O)
- * 정맥/상처/장루 분야의 경우 환자 오른쪽 마우스 기능에 협진관리추가하여 팝업창을 띄운다.
- ***********************************************************************************************************************************************************/
- function fConsultLink(){
-
- var curRow = grd_edupatlist.row;
- var rgstflag = model.getValue(xEdupatlistPath + '[' + curRow + ']/rgstflag');
- var reqdetlflag = model.getValue(xEdupatlistPath + '[' + curRow + ']/reqdetlflag');
-
- //20090708 dhkim 환자정보파라미터추가
- var pid = model.getValue(xEdupatlistPath + '[' + curRow + ']/pid');
- var patnm = model.getValue(xEdupatlistPath + '[' + curRow + ']/pidnm');
- var sexage = model.getValue(xEdupatlistPath + '[' + curRow + ']/age');
- var orddeptnm = model.getValue(xEdupatlistPath + '[' + curRow + ']/dept');
- var roomcd = model.getValue(xEdupatlistPath + '[' + curRow + ']/roomcd');
-
- var patParamStr = pid + "▦" + patnm + "▦" + sexage + "▦" + orddeptnm + "▦" + roomcd;
-
- //if(rgstflag == 'R' || reqdetlflag == '0000000773' || reqdetlflag == '0000000774' || reqdetlflag == '0000000767'){
-
- //20090522 dhkim 하드코딩수정
- if(rgstflag == 'R'){
-
- var formrecseq = model.getValue(xEdupatlistPath + '[' + curRow + ']/formrecseq');
- setParameter("openmode", "reccnstform");
- setParameter("formrecseq", formrecseq); //서식기록테이블의 formrecseq(기록순번)
-
- //20090522 dhkim 하드코딩수정 suppdeptcd, suppdeptnm
- //setParameter("userdeptcd", "3043900000");
- setParameter("userdeptcd", suppdeptcd);
-
- //20090708 dhkim 환자정보파라미터추가
- //setParameter("disppatinfo", "pid▦patnm▦F/A▦orddeptnm▦roomcd");
- setParameter("disppatinfo", patParamStr);
-
- //modal("../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw", 1, 0, 0 ,"", "", "");
- modal("SSMMR01100", 1, 0, 0 ,"", "", "");
-
- //}else{
-
- //messageBox("정맥주사/상처/장요루 전문간호사가 아니면 협진관리 화면을 열 수","I004");
- //return false;
- }
-
- }
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @desc : 전문간호 조회결과를 엑셀로 저장
- ***********************************************************************************************************************************************************/
- function fStoreExcel(){
- var iRow = grd_edupatlist.rows;
- if(iRow < 2){
- messageBox("Excel로 저장할 환자가 ","I004");
- return;
- }
-
- file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(file != "") {
- grd_edupatlist.saveExcel(file);
- }
-
- }
-
-
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @create : 20090119
- * @desc : 전문분야콤보 change event
- ***********************************************************************************************************************************************************/
- function fSpclComboChanged(){
-
- //전문분야에 해당하는 default 조회구간을 설정한다.
- //정맥, 상처, 장요루 default : 의뢰일기준
- //신경, 유방센터 default : 처방일기준
- var spcl = model.getValue("/root/cond/spcl");
- var deptflag = '';
- var deptcd = '';
- var reqyn = 'f';
- var nodesetCnt = getNodesetCount('/root/hidden/nursdeptinfo/nursdeptlist');
- for(var i = 1; i <= nodesetCnt; i++){
- deptflag = model.getValue('/root/hidden/nursdeptinfo/nursdeptlist[' + i + ']/deptflag');
- deptcd = model.getValue('/root/hidden/nursdeptinfo/nursdeptlist[' + i + ']/deptcd');
- //alert('deptflag '+deptflag + ' deptcd ' + deptcd + ' spcl ' + spcl);
- if(deptflag == 'R' && deptcd == spcl){
- reqyn = 't';
- break;
- }
- }
-
- //alert('reqyn ' + reqyn);
-
- if(reqyn == 't'){//의뢰
- grd_edupatlist.colWidth(8) = 0;
- grd_edupatlist.colWidth(11) = 100;
- grd_edupatlist.colWidth(5) = 90;
- model.setValue("/root/cond/ddflag","R");
- grd_edupatlist.valueMatrix(0,7)="의뢰일";
- grd_edupatlist.valueMatrix(0,9)="의뢰명";
- }else{
- grd_edupatlist.colWidth(8) = 71;
- grd_edupatlist.colWidth(11) = 79;
- grd_edupatlist.colWidth(5) = 56;
- model.setValue("/root/cond/ddflag","O");
- grd_edupatlist.valueMatrix(0,7)="처방일";
- grd_edupatlist.valueMatrix(0,9)="처방명";
- }
-
- rdo_ddflag.refresh();
- }
-
-
-
- /***********************************************************************************************************************************************************
- * @author : dhkim
- * @create : 20090128
- * @desc : 상처/장요루 분야의 경우 상처, 장요루 코드를 함께 조회하도록 쿼리를 만들어서 조회한다.
- ***********************************************************************************************************************************************************/
- function fMakeSpclSideQuery(spclFildCd){
-
-
- var nodesetCnt = getNodesetCount("/root/hidden/spclsideinfo/spclsidelist");
- var deptcd = "";
- var qryStr = "";
- var sideYn = "f";
- var retSpclCd = '';
-
-
- for(var i = 1; i <= nodesetCnt; i++){
- deptcd = model.getValue("/root/hidden/spclsideinfo/spclsidelist[" + i + "]/deptcd");
- if(i == nodesetCnt){
- qryStr += deptcd;
- }else{
- qryStr += deptcd + "|";
- }
-
- if(spclFildCd == deptcd){
- sideYn = "t";
- break;
- }
- }
-
- if(sideYn == "t"){
- retSpclCd = qryStr;
- }else{
- retSpclCd = spclFildCd;
- }
-
- //alert(retSpclCd);
-
- return retSpclCd;
-
- }
-
-
- /***********************************************************************************************************************************************************
- * @author : smy
- * @create : 20100218
- * @desc : 통합기록조회 링크
- *
- ***********************************************************************************************************************************************************/
- function fSytsRecLink(){
- var pid = model.getValue(xEdupatlistPath + '[' + grd_edupatlist.row + ']/pid');
- setParameter("SMMRI00400_param_pid", pid);
- modal("SMMRI00400", 1, 0, 0 ,"", "", "");
- }
-
-
|