define([
	'Global',
	'ConsultService'
],
	function(Global, ConsultService) {
		var ConsultServices = Backbone.Collection.extend({
			model: ConsultService,
			parse: function(response) {
				return response.SMConsultService;
			},
			initialize: function() {
			},
			findById: function(id) {
				return this.find(function (model) {
					return model.get('consultId') === id;
				});
			}
		});

		ConsultServices.singleInstance = null;

		ConsultServices.instance = function () {
			ConsultServices.singleInstance = ConsultServices.singleInstance || new ConsultServices();
			return ConsultServices.singleInstance;
		};

		return ConsultServices;
	}
);

