(function($){
	var consulting = {
        getList: function(data){
            return APIService.httpGet('/im_new/consult/getList', data);
        },
        getListTableAjaxObj: { //表格数据获取时，使用的ajax请求配置
            method: 'get',
            url: APIService.server + 'im_new/consult/getList', 
            contentType: "application/json",
            dataType: "json",
            ajaxOptions: {
                beforeSend: function(request) {
                    var userAgent = APIService.userAgent;
                    userAgent = JSON.stringify(userAgent);
                    request.setRequestHeader("userAgent", userAgent);
                }
            }
        },
        getListCount: function(data){
            return APIService.httpGet('/im_new/consult/getListCount', data);
        },
        getPrescriptionInfo: function(data){
            return APIService.httpGet('/doctor/consult/prescriptionDetail', data);
        },
        //IM相关的接口
        socketUrl: APIService.imserver+'/socket.io/socket.io.js',
        getMessages: function(sessionId, data){
            return APIService.imHttpGet('/sessions/'+sessionId+'/messages', data);
        },
        getMembers: function(sessionId){
            return APIService.imHttpGet('/sessions/'+sessionId+'/participants');
        }
    };

    window.consultingAPI = consulting;
})(jQuery)
