/** * consent */ var mplus_mobile_consent = function(){ $hospitalServiceBaseUrl = contextPath + "/mobile/hospital"; $patientServiceBaseUrl = contextPath + "/mobile"; $consentServiceBaseUrl = contextPath + "/mobile/consent"; var self = this; this.hospital = { //부서리스트 getDeptList : function(request){ var deptList = [ { "deptnm": "전체", "deptcd": " " }, { "deptnm": "육아상담실(영유아검진실)", "deptcd": "1111111111" }, { "deptnm": "외과", "deptcd": "2222222222" } ]; return deptList; }, //의사리스트 getDoctorList : function(request){ var doctorList = [ { "doctornm": "전체", "doctorid": " " }, { "doctornm": "김예준", "doctorid": "111111" }, { "doctornm": "김준수", "doctorid": "222222" } ]; return doctorList; }, //병동리스트 getWardList : function(){ var wardList = [ { "deptnm": "전체", "deptcd": " " }, { "deptnm": "00병동", "deptcd": "000000000" }, { "deptnm": "11병동", "deptcd": "1111111111" }, { "deptnm": "22병동", "deptcd": "2222222222" } ]; return wardList; }, // 환자정보조회 getPatientInfo : function(request){ var patientInfoList = [{ ioaddate:"20160929", iodxNm:"유방암", iomaindrId:"123456", iomaindrNm:"김예준", ioptID:"2061272", ioptName:"홍길동", iorespiration:"02", ioroomNo:"123", iosexAgeYM:"F/21" }, { ioaddate:"20160929", iodxNm:"유방암", iomaindrId:"123456", iomaindrNm:"김예준", ioptID:"2061272", ioptName:"김준수", iorespiration:"02", ioroomNo:"123", iosexAgeYM:"F/21" } ]; return patientInfoList; } }; this.patient = { //환자리스트 조회 getPatientList : function(type, request){ var patientList = [ { deptnm:"육아상담실(영유아검진실)", doctorid:"123456", doctornm:"홍길동", hngnm:"성춘향", indd:"2016/09/29", instcd:"000", oproomnm:"", orddd:"20160928", orddeptcd:"2100000000", orddrid:"", orddrnm:"", ordtm:"N", ordtype:"I", pid:"1234567", roomcd:"123", sa:"F/21y11m"}, { deptnm:"외과", doctorid:"123456", doctornm:"김예준", hngnm:"김준수", indd:"2016/09/29", instcd:"000", oproomnm:"", orddd:"20160928", orddeptcd:"2100000000", orddrid:"", orddrnm:"", ordtm:"N", ordtype:"I", pid:"1234567", roomcd:"123", sa:"F/21y11m"} ]; return patientList; } }; this.consent = { //동의서조회 getConsentList : function(request){ var consentList = [ { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "홍길동", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "TEMP", "doctor": "", "clnDate": "20150615", "consentStateDisp": "임시저장", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" }, { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "김예준", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "UNFINISHED", "doctor": "", "clnDate": "20150615", "consentStateDisp": "미작성", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" }, { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "김예준", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "ELECTR_CMP", "doctor": "", "clnDate": "20150615", "consentStateDisp": "서명", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" }, { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "김예준", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "PAPER_OUT", "doctor": "", "clnDate": "20150615", "consentStateDisp": "출력", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" }, { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "김예준", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "CERTIFY_CMP", "doctor": "", "clnDate": "20150615", "consentStateDisp": "인증", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" }, { "createUserId": "123456", "ocrNumber": "2016092912345", "orderCd": "0000000000", "roomCd": "123", "prntCnt": 1, "hosType": "111", "createUserName": "김예준", "ward": "11", "clnDeptNm": "외과", "cosignDcId": null, "formCd": "", "formGuid": "", "patientCode": "1234567", "cosignDcName": null, "consentMstRid": 111, "orderNm": "외과", "orderNo": 111, "consentName": "폐결핵에 대한 설명 및 동의서", "visitType": "I", "createDateTime": "2016-09-29 14:23:17", "consentState": "VERBAL", "doctor": "", "clnDate": "20150615", "consentStateDisp": "구두", "formRid": 185, "cretno": 1, "clnDeptCd": "2040000000" } ]; return consentList; }, //동의서 검색 getConsentBySearch: function(request){ var consentList = [ { "formName": "자기공명영상(MRI)검사 설명 및 동의서" }, { "formName": "컴퓨터단층촬영(CT) 검사 설명 및 동의서" } ]; return consentList; }, //동의서 set조회 getConsentSetList: function(request){ var consentList = [ { "formName": "자기공명영상(MRI)검사 설명 및 동의서" }, { "formName": "컴퓨터단층촬영(CT) 검사 설명 및 동의서" } ]; return consentList; }, //카테고리리스트 조회 getCategoryForDropdown: function(request){ var categoryList = [ { "categoryName": "전체", "categoryId": "1" }, { "categoryName": "cate", "categoryId": "2" }, { "categoryName": "gory", "categoryId": "3" } ]; return categoryList; }, makeConsentStateParam: function() { // 체크된 박스들 var checkedStatus = $('.consentSearchBox input:checked'); // 체크된게 없으면 일단 이렇게 처리 if( checkedStatus == undefined ) { alert('동의서 상태 조건을 선택하세요!'); } var consentStatus = ''; for(var i = 0; i < checkedStatus.length; i++) { // 전체가 체크된 경우 뒤도 돌아보지않고 ALL만 리턴하도록 if( checkedStatus[i].value == 'ALL') { consentStatus = checkedStatus[i].value; return consentStatus; } else { consentStatus = consentStatus + checkedStatus[i].value; } // 콤마 구분자 추가 if(i != checkedStatus.length - 1) { consentStatus = consentStatus + ','; } } return consentStatus; } }; };