/*jslint node: true, nomen: true, unparam: true */
/*global jquery, $, _, define, Marionette, jqm, describe, it, expect, beforeEach, spyOn */
'use strict';

define([ 'Global',
	'patient-search/models/Searches',
	'patient-search/models/Patient'],
	function ( Global, Searches, Patient) {
		var singleInstance,
			Model = Backbone.Model.extend({
			defaults: {
				configTypes: {
					patients: true,
					clinics: true,
					wards: true,
					recent: true,
					myList: false
				},
				title: '',
				searchType: 'patients',
				patient: new Patient()
			},
			validate: function (attrs) {
				return undefined;
			},
			searches: new Searches()
		});

		if (typeof singleInstance === 'undefined') {
			singleInstance = new Model();
		}

		return singleInstance;
	});
