package com.dbs.mplus.service.api;

import com.dbs.mplus.framework.api.model.ApiModel.ApiType;

/**
 * 세브란스병원 API
 * 
 * 
 * 
 * @author siyoung.ahn
 *
 */
public enum MPlusApi {
	
	// 앱관리 - 버전확인 	
	APP_CHECKAPPNAMEVERSION(ApiType.SQL, "/deployment/checkAppNameVersion", false), 
	
	/* APP배포  ---------------------------------------------------------------------  */
	DEPLOYMENT_INPUTDOWNLOADLOG(ApiType.WEB_SERVICE, "/deployment/inputDownloadLog", true),

	/* 로그인  ---------------------------------------------------------------------  */
	LOGIN_DOLOGIN(ApiType.WEB_SERVICE, "/login/doLogin", true),
	LOGIN_INPUTLOGINLOG(ApiType.WEB_SERVICE, "/login/inputLoginLog", true),
  SAFETY_GETNFCDOCTORID(ApiType.WEB_SERVICE, "/safety/getNfcDoctorId", true),
  SAFETY_DONFCLOGIN(ApiType.WEB_SERVICE, "/safety/doNfcLogin", true),
  

	/* 병원관리  ---------------------------------------------------------------------  */
	/* 일정관리  ---------------------------------------------------------------------  */
	SCHEDULE_GETSCHEXAMDEPTLIST(ApiType.WEB_SERVICE, "/schedule/getSchExamDeptList", true),
	SCHEDULE_GETSHCDEPTLIST(ApiType.WEB_SERVICE, "/schedule/getShcDeptList", true),
	SCHEDULE_GETSHCWARDLIST(ApiType.WEB_SERVICE, "/schedule/getShcWardList", true),
	SCHEDULE_GETONDUTYWEEKSCH(ApiType.WEB_SERVICE, "/schedule/getOnDutyWeekSch", true),
	SCHEDULE_GETONDUTYMONTHSCH(ApiType.WEB_SERVICE, "/schedule/getOnDutyMonthSch", true),
	SCHEDULE_GETWORKSCH(ApiType.WEB_SERVICE, "/schedule/getWorkSch", true),
	SCHEDULE_GETDOCTORINFO(ApiType.WEB_SERVICE, "/schedule/getDoctorInfo", true),

	/* 진료-서비스  ---------------------------------------------------------------------  */
	MEDICAL_GETINHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getInHistoryList", true),
	MEDICAL_GETOUTHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getOutHistoryList", true),
	MEDICAL_GETOPHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getOpHistoryList", true),
	MEDICAL_GETMEDIRECORD(ApiType.WEB_SERVICE, "/medical/getMediRecord", true),
	MEDICAL_GETINDATELIST(ApiType.WEB_SERVICE, "/medical/getInDateList", true),
	MEDICAL_GETOUTDATELIST(ApiType.WEB_SERVICE, "/medical/getOutDateList", true),
	MEDICAL_GETPRESCRIPTIONCLSLIST(ApiType.WEB_SERVICE, "/medical/getPrescriptionClsList", true),
	MEDICAL_GETPRESCRIPTIONSTATLIST(ApiType.WEB_SERVICE, "/medical/getPrescriptionStatList", true),
	MEDICAL_GETPRESCRIPTION(ApiType.WEB_SERVICE, "/medical/getPrescription", true),
	MEDICAL_GETDRUGINFO(ApiType.WEB_SERVICE, "/medical/getDrugInfo", true),
	MEDICAL_GETDRUGDETAIL(ApiType.WEB_SERVICE, "/medical/getDrugDetail", true),
	MEDICAL_GETEXAMRECEIPTDEPTLIST(ApiType.WEB_SERVICE, "/medical/getExamReceiptDeptList", true),
	MEDICAL_GETEXAMLIST(ApiType.WEB_SERVICE, "/medical/getExamList", true),
	MEDICAL_GETEXAMRSLTTY1(ApiType.WEB_SERVICE, "/medical/getExamRsltTy1", true),
	MEDICAL_GETEXAMRSLTTY2(ApiType.WEB_SERVICE, "/medical/getExamRsltTy2", true),
	MEDICAL_GETOPDETAILHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getOpDetailHistoryList", true),
	MEDICAL_GETOPERATIONDETAIL(ApiType.WEB_SERVICE, "/medical/getOperationDetail", true),
	MEDICAL_GETTRDETAILHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getTrDetailHistoryList", true),
	MEDICAL_GETTREATMENTDETAIL(ApiType.WEB_SERVICE, "/medical/getTreatmentDetail", true),
	MEDICAL_GETCODETAILHISTORYLIST(ApiType.WEB_SERVICE, "/medical/getCoDetailHistoryList", true),
	MEDICAL_GETCOLLABORATIONDETAIL(ApiType.WEB_SERVICE, "/medical/getCollaborationDetail", true),
	MEDICAL_GETMEDIRECORDLIST(ApiType.WEB_SERVICE, "/medical/getMediRecordList", true),
	MEDICAL_GETMEDIRECORDFORMLIST(ApiType.WEB_SERVICE, "/medical/getMediRecordFormList", true),
	MEDICAL_GETMEDIRECORDDETAIL(ApiType.WEB_SERVICE, "/medical/getMediRecordDetail", true),
	MEDICAL_GETMEDIRECORDCONTENTDETAIL(ApiType.WEB_SERVICE, "/medical/getMediRecordContentDetail", true),
	MEDICAL_GETVITALLIST(ApiType.WEB_SERVICE, "/medical/getVitalList", true),
	MEDICAL_GETVITALLISTSUM(ApiType.WEB_SERVICE, "/medical/getVitalListSum", true),
	MEDICAL_GETVITALLISTSUM2(ApiType.WEB_SERVICE, "/medical/getVitalListSum2", true),
	MEDICAL_GETMEDICATIONLIST(ApiType.WEB_SERVICE, "/medical/getMedicationList", true),
	MEDICAL_INPUTVITAL(ApiType.WEB_SERVICE, "/medical/inputVital", true),
	MEDICAL_GETVITALBYLAST(ApiType.WEB_SERVICE, "/medical/getVitalByLast", true),

	/* 진료-환자검색  ---------------------------------------------------------------------  */
	MEDICAL_GETDEPTLIST(ApiType.WEB_SERVICE, "/medical/getDeptList", true),
	MEDICAL_GETDOCTORLISTBYDEPT(ApiType.WEB_SERVICE, "/medical/getDoctorListByDept", true),
	MEDICAL_GETWARDLIST(ApiType.WEB_SERVICE, "/medical/getWardList", true),
	MEDICAL_GETROOMLISTBYWARD(ApiType.WEB_SERVICE, "/medical/getRoomListByWard", true),
	MEDICAL_GETINPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getInPatientList", true),
	MEDICAL_GETOUTTREATSTATLIST(ApiType.WEB_SERVICE, "/medical/getOutTreatStatList", true),
	MEDICAL_GETOUTPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getOutPatientList", true),
	MEDICAL_GETEMTREATSTATLIST(ApiType.WEB_SERVICE, "/medical/getEmTreatStatList", true),
	MEDICAL_GETEMPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getEmPatientList", true),
	MEDICAL_GETOPERATIONCNTRLIST(ApiType.WEB_SERVICE, "/medical/getOperationCntrList", true),
	MEDICAL_GETOPERATIONROOMLIST(ApiType.WEB_SERVICE, "/medical/getOperationRoomList", true),
	MEDICAL_GETOPERATIONSTATLIST(ApiType.WEB_SERVICE, "/medical/getOperationStatList", true),
	MEDICAL_GETOPPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getOpPatientList", true),
	MEDICAL_GETTREATMENTCNTRLIST(ApiType.WEB_SERVICE, "/medical/getTreatmentCntrList", true),
	MEDICAL_GETTREATMENTSTATLIST(ApiType.WEB_SERVICE, "/medical/getTreatmentStatList", true),
	MEDICAL_GETTRPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getTrPatientList", true),
	MEDICAL_GETCOPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getCoPatientList", true),
	MEDICAL_GETBARPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getBarPatientList", true),
	MEDICAL_GETQRPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getQrPatientList", true),
	MEDICAL_GETNFCPATIENTLIST(ApiType.WEB_SERVICE, "/medical/getNfcPatientList", true),

	/* 진료-환자정보  ---------------------------------------------------------------------  */
	MEDICAL_CHECKACCESSRIGHTS(ApiType.WEB_SERVICE, "/medical/checkAccessRights", true),
	MEDICAL_GETPATIENTINFO(ApiType.WEB_SERVICE, "/medical/getPatientInfo", true),
	MEDICAL_GETPATIENTNOTICE(ApiType.WEB_SERVICE, "/medical/getPatientNotice", true),

    /* 진료-환자안전관리*/
    MEDICAL_GETATCPRESCRIPTIONLIST(ApiType.WEB_SERVICE, "/safety/getAtcPrescriptionList", true),
    MEDICAL_GETINJECTIONLIST(ApiType.WEB_SERVICE, "/safety/getInjectionList", true),
    MEDICAL_INPUTINJECTION(ApiType.WEB_SERVICE, "/safety/inputInjection", true),
    MEDICAL_GETINFUSIONLIST(ApiType.WEB_SERVICE, "/safety/getInfusionList", true),
    MEDICAL_INPUTSTARTINFUSION(ApiType.WEB_SERVICE, "/safety/inputStartInfusion", true),
    MEDICAL_INPUTENDINFUSION(ApiType.WEB_SERVICE, "/safety/inputEndInfusion", true),
    MEDICAL_GETSPECIMENLIST(ApiType.WEB_SERVICE, "/safety/getSpecimenList", true),
    MEDICAL_ACTSPECIMEN(ApiType.WEB_SERVICE, "/safety/actSpecimen", true),
    MEDICAL_GETBLOODREQUESTLIST(ApiType.WEB_SERVICE, "/safety/getBloodRequestList", true),
    MEDICAL_INPUTBLOODREQUEST(ApiType.WEB_SERVICE, "/safety/inputBloodRequest", true),
    MEDICAL_GETBLOODRECEIVELIST(ApiType.WEB_SERVICE, "/safety/getBloodReceiveList", true),
    MEDICAL_INPUTBLOODRECEIVE(ApiType.WEB_SERVICE, "/safety/inputBloodReceive", true),
    MEDICAL_GETBLOODCHECKLIST(ApiType.WEB_SERVICE, "/safety/getBloodCheckList", true),
    MEDICAL_GETBLOODDETAILINFO(ApiType.WEB_SERVICE, "/safety/getBloodDetailInfo", true),
    MEDICAL_INPUTBLOODCHECK(ApiType.WEB_SERVICE, "/safety/inputBloodCheck", true),
    MEDICAL_GETBLOODCANCELLIST(ApiType.WEB_SERVICE, "/safety/getBloodCancelList", true),
    MEDICAL_INPUTBLOODCANCEL(ApiType.WEB_SERVICE, "/safety/inputBloodCancel", true),
    MEDICAL_GETPRESCRIPTIONLIST(ApiType.WEB_SERVICE, "/safety/getPrescriptionList", true),
    MEDICAL_GETPOCPATIENTINFO(ApiType.WEB_SERVICE, "/safety/getPocPatientInfo", true),
    MEDICAL_ACTMEDICATION(ApiType.WEB_SERVICE, "/safety/actMedication", true),
    MEDICAL_INPUTCHECKUPID(ApiType.WEB_SERVICE, "/safety/inputCheckupId", true),
    MEDICAL_INPUTBLOODHEALTHCHECK(ApiType.WEB_SERVICE, "/safety/inputBloodHealthCheck", true),
    MEDICAL_INPUTBLOODSIGNDATA(ApiType.WEB_SERVICE, "/safety/inputBloodSignData", true),
    MEDICAL_GETSIDEEFFECTLIST(ApiType.WEB_SERVICE, "/safety/getSideEffectList", true),
    MEDICAL_GETTRANSSTOPREASONLIST(ApiType.WEB_SERVICE, "/safety/getTransStopReasonList", true),
    
	
	/*------------------------------------- 현재 안쓰는 API들  ----------------------------------------------*/
	// 정리 예정 ?
	// 사용자관리 - 로그인실패횟수증가 
	USER_LOGIN_INCLOGINFAILCNT(ApiType.SQL, "/user/login/incLoginFailCnt", false), 
	// 사용자관리 - 로그인 실패횟수 초기화 
	USER_LOGIN_CLEARLOGINFAILCNT(ApiType.SQL, "/user/login/clearLoginFailCnt", false), 
	// 사용자관리 - 최근 로그인 조회 (배치) 
	USER_LOGIN_GETACCESSDAY(ApiType.SQL, "/user/login/getAccessDay", true), 
	// 사용자관리 - 비밀번호 변경 
	USER_PASSWORD_RESETPWD(ApiType.SQL, "/user/password/resetPWD", false), 
	// 사용자관리 - 비밀번호 변경 
	USER_PASSWORD_TEMPRESETPWD(ApiType.SQL, "/user/password/tempResetPWD", false), 
	// 사용자관리 - 비밀번호 확인 
	USER_PASSWORD_CHECKPWD(ApiType.SQL, "/user/password/checkPWD", false), 
	/* 비슷한 api 구분선 ---------------------------------------------------------------------------------- */
	
	// PUSH - 탈퇴알림 
	HELPERPUSH_WITHDRAWAL(ApiType.SQL, "/helperpush/withdrawal", false),
	
	// 토큰관리 - 디바이스 토큰저장 
	USER_TOKEN_SAVEDEVICETOKEN(ApiType.SQL, "/user/tokens/saveDeviceToken", false), 
	// 토큰관리 - 디바이스 토큰확인 
	USER_TOKEN_CHECKDEVICETOKEN(ApiType.SQL, "/user/tokens/checkDeviceToken", false), 	
	// 토큰관리 - 사용자 토큰조회 
	USER_TOKEN_GETUSERDEVICETOKENS(ApiType.SQL, "/user/tokens/getUserDeviceTokens", true), 
	
	
	/* 비슷한 api 구분선 ---------------------------------------------------------------------------------- */
	
	// 토큰기준으로 정보 가져오기 
	USER_USERINFO_GETDEVICETOKENUSERLIST(ApiType.SQL, "/user/userinfo/getDeviceTokenUserList", true), 
	// 특정 토큰 삭제 
	USER_USERINFO_DELETEDEVICETOKENUSER(ApiType.SQL, "/user/userinfo/deleteDeviceTokenUser", false);

	/* 비슷한 api 구분선 ---------------------------------------------------------------------------------- */
	
	
	private ApiType apiType; 
	private String apiUrl; 
	// 결과가 list인지 여부 
	private boolean bList; 

	/**
	 * 생성자 
	 * @param apiType
	 * @param apiUrl
	 * @param bList 결과가 리스트인지 여부 
	 */
	private MPlusApi(ApiType apiType, String apiUrl, boolean bList) {
		this.apiType = apiType; 
		this.apiUrl = apiUrl; 
		this.bList = bList; 
	}
	/**
	 * Api유형 
	 * @return
	 */
	public ApiType getApiType() { 
		return this.apiType; 
	}
	/**
	 * Api URL 
	 * @return
	 */
	public String getApiUrl() { 
		return this.apiUrl; 
	}
	/**
	 * 결과가 list형인지 여부 
	 * @return
	 */
	public boolean isList() { 
		return this.bList; 
	}
	
	@Override 
	public String toString() { 
		StringBuilder builder = new StringBuilder(); 
		
		builder.append(this.name()).append(", "); 
		builder.append(this.apiType).append(", "); 
		builder.append(this.bList ? "LIST" : "MAP").append(", "); 
		builder.append(this.apiUrl);
		
		return builder.toString(); 
	}
}
