///<summary>
		/// Determines whether the specified <see cref="VcsPatientBase"/> instances are considered equal.
		///</summary>
		///<param name="Object1">The first <see cref="VcsPatientBase"/> to compare.</param>
		///<param name="Object2">The second <see cref="VcsPatientBase"/> to compare. </param>
		///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns>
		public static bool Equals(VcsPatientBase Object1, VcsPatientBase Object2)
		{
			// both are null
			if (Object1 == null && Object2 == null)
				return true;

			// one or the other is null, but not both
			if (Object1 == null ^ Object2 == null)
				return false;

			bool equal = true;
			if (Object1.PatientCode != Object2.PatientCode)
				equal = false;
			if (Object1.FirstName != Object2.FirstName)
				equal = false;
			if (Object1.MiddleName != null && Object2.MiddleName != null )
			{
				if (Object1.MiddleName != Object2.MiddleName)
					equal = false;
			}
			else if (Object1.MiddleName == null ^ Object1.MiddleName == null )
			{
				equal = false;
			}
			if (Object1.LastName != Object2.LastName)
				equal = false;
			if (Object1.DateOfBirth != Object2.DateOfBirth)
				equal = false;
			if (Object1.Sex != Object2.Sex)
				equal = false;
			if (Object1.MemberType != Object2.MemberType)
				equal = false;
			if (Object1.MembershipSosNumber != null && Object2.MembershipSosNumber != null )
			{
				if (Object1.MembershipSosNumber != Object2.MembershipSosNumber)
					equal = false;
			}
			else if (Object1.MembershipSosNumber == null ^ Object1.MembershipSosNumber == null )
			{
				equal = false;
			}
			if (Object1.MembershipSosExpDate != null && Object2.MembershipSosExpDate != null )
			{
				if (Object1.MembershipSosExpDate != Object2.MembershipSosExpDate)
					equal = false;
			}
			else if (Object1.MembershipSosExpDate == null ^ Object1.MembershipSosExpDate == null )
			{
				equal = false;
			}
			if (Object1.Nationality != Object2.Nationality)
				equal = false;
			if (Object1.HomeStreet != null && Object2.HomeStreet != null )
			{
				if (Object1.HomeStreet != Object2.HomeStreet)
					equal = false;
			}
			else if (Object1.HomeStreet == null ^ Object1.HomeStreet == null )
			{
				equal = false;
			}
			if (Object1.HomeWard != null && Object2.HomeWard != null )
			{
				if (Object1.HomeWard != Object2.HomeWard)
					equal = false;
			}
			else if (Object1.HomeWard == null ^ Object1.HomeWard == null )
			{
				equal = false;
			}
			if (Object1.HomeDistrict != null && Object2.HomeDistrict != null )
			{
				if (Object1.HomeDistrict != Object2.HomeDistrict)
					equal = false;
			}
			else if (Object1.HomeDistrict == null ^ Object1.HomeDistrict == null )
			{
				equal = false;
			}
			if (Object1.HomeCity != null && Object2.HomeCity != null )
			{
				if (Object1.HomeCity != Object2.HomeCity)
					equal = false;
			}
			else if (Object1.HomeCity == null ^ Object1.HomeCity == null )
			{
				equal = false;
			}
			if (Object1.HomeCountry != null && Object2.HomeCountry != null )
			{
				if (Object1.HomeCountry != Object2.HomeCountry)
					equal = false;
			}
			else if (Object1.HomeCountry == null ^ Object1.HomeCountry == null )
			{
				equal = false;
			}
			if (Object1.CompanyCode != null && Object2.CompanyCode != null )
			{
				if (Object1.CompanyCode != Object2.CompanyCode)
					equal = false;
			}
			else if (Object1.CompanyCode == null ^ Object1.CompanyCode == null )
			{
				equal = false;
			}
			if (Object1.BillingAddress != null && Object2.BillingAddress != null )
			{
				if (Object1.BillingAddress != Object2.BillingAddress)
					equal = false;
			}
			else if (Object1.BillingAddress == null ^ Object1.BillingAddress == null )
			{
				equal = false;
			}
			if (Object1.HomePhone != null && Object2.HomePhone != null )
			{
				if (Object1.HomePhone != Object2.HomePhone)
					equal = false;
			}
			else if (Object1.HomePhone == null ^ Object1.HomePhone == null )
			{
				equal = false;
			}
			if (Object1.MobilePhone != null && Object2.MobilePhone != null )
			{
				if (Object1.MobilePhone != Object2.MobilePhone)
					equal = false;
			}
			else if (Object1.MobilePhone == null ^ Object1.MobilePhone == null )
			{
				equal = false;
			}
			if (Object1.CompanyPhone != null && Object2.CompanyPhone != null )
			{
				if (Object1.CompanyPhone != Object2.CompanyPhone)
					equal = false;
			}
			else if (Object1.CompanyPhone == null ^ Object1.CompanyPhone == null )
			{
				equal = false;
			}
			if (Object1.Fax != null && Object2.Fax != null )
			{
				if (Object1.Fax != Object2.Fax)
					equal = false;
			}
			else if (Object1.Fax == null ^ Object1.Fax == null )
			{
				equal = false;
			}
			if (Object1.EmailAddress != null && Object2.EmailAddress != null )
			{
				if (Object1.EmailAddress != Object2.EmailAddress)
					equal = false;
			}
			else if (Object1.EmailAddress == null ^ Object1.EmailAddress == null )
			{
				equal = false;
			}
			if (Object1.CreateUser != null && Object2.CreateUser != null )
			{
				if (Object1.CreateUser != Object2.CreateUser)
					equal = false;
			}
			else if (Object1.CreateUser == null ^ Object1.CreateUser == null )
			{
				equal = false;
			}
			if (Object1.CreateDate != Object2.CreateDate)
				equal = false;
			if (Object1.ValidCorporate != Object2.ValidCorporate)
				equal = false;
			if (Object1.DefaultPaymentMode != Object2.DefaultPaymentMode)
				equal = false;
			if (Object1.InsuranceCardNumber != null && Object2.InsuranceCardNumber != null )
			{
				if (Object1.InsuranceCardNumber != Object2.InsuranceCardNumber)
					equal = false;
			}
			else if (Object1.InsuranceCardNumber == null ^ Object1.InsuranceCardNumber == null )
			{
				equal = false;
			}
			if (Object1.InsuranceCardExpDate != null && Object2.InsuranceCardExpDate != null )
			{
				if (Object1.InsuranceCardExpDate != Object2.InsuranceCardExpDate)
					equal = false;
			}
			else if (Object1.InsuranceCardExpDate == null ^ Object1.InsuranceCardExpDate == null )
			{
				equal = false;
			}
			if (Object1.IsDisabled != Object2.IsDisabled)
				equal = false;
			if (Object1.UpdateUser != null && Object2.UpdateUser != null )
			{
				if (Object1.UpdateUser != Object2.UpdateUser)
					equal = false;
			}
			else if (Object1.UpdateUser == null ^ Object1.UpdateUser == null )
			{
				equal = false;
			}
			if (Object1.UpdateDate != Object2.UpdateDate)
				equal = false;
			if (Object1.ApptRemark != null && Object2.ApptRemark != null )
			{
				if (Object1.ApptRemark != Object2.ApptRemark)
					equal = false;
			}
			else if (Object1.ApptRemark == null ^ Object1.ApptRemark == null )
			{
				equal = false;
			}
			if (Object1.Remark != null && Object2.Remark != null )
			{
				if (Object1.Remark != Object2.Remark)
					equal = false;
			}
			else if (Object1.Remark == null ^ Object1.Remark == null )
			{
				equal = false;
			}
			return equal;
		}
		///<summary>
		/// Returns a value indicating whether this instance is equal to a specified object.
		///</summary>
		///<param name="toObject">An object to compare to this instance.</param>
		///<returns>true if toObject is a <see cref="VcsPatientBase"/> and has the same value as this instance; otherwise, false.</returns>
		public virtual bool Equals(VcsPatientBase toObject)
		{
			if (toObject == null)
				return false;
			return Equals(this, toObject);
		}