CREATE View vwAdmVisitsNonConfidential AS

/* Create by Acmeware, Inc., All Rights Reserved					*/
/*--------------------------------------------------------------------------------------*/
/* This View returns a all AdmVisit columns where the visit is non-confidential		*/
/* visit and the admission is not cancelled, scheduled, or a pre-admission		*/
/*											*/
/*--------------------------------------------------------------------------------------*/
/*											*/
/* THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, 	*/
/* INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND 	*/
/* FITNESS FOR A PARTICULAR PURPOSE.							*/



SELECT *
FROM livedb.dbo.AdmVisits AV
WHERE 
	IsNull(AV.Confidential, 'N') <> 'Y'
	AND Left(AV.Status, 3) NOT IN ('CAN','SCH','PRE')