KinnickGable
6/13/2018 - 4:57 PM

SMH-dbM-PatientAccess-Audit

/* 
	Created: June 13, 2018
	Version 1.0
	Description: Used to track dbMotion Emergency Declaration Events
	Created by: Michael Donnelly
*/
USE dbmADRLV3
SELECT *
      ,[YearNo]
      ,[OccurrenceTime]
      ,[EventDate]
      ,[EventHourInDay]
      ,[DayOfMonth]
      ,[WeekDay]
      ,[WeekDayName]
      ,[Event_ID]
      ,[EventDefID]
      ,[EventDefName]
      ,[ExtendedPropertyName]
      ,[Value]
      ,[UserID]
      ,[UserDisplayName]
      ,[PatientId]
      ,[PatientName]
      ,[Gender]
      ,[Age]
      ,[City]
      ,[State]
      ,[Country]
      ,[SessionID]
      ,[CoordinationName]
      ,[ActiveRoleName]
  FROM [dbmADRLV3].[dbo].[LV3_TrcAction]
  
  WHERE ExtendedPropertyName = 'Page Name'

		AND dbmADRLV3.dbo.LV3_TrcAction.OccurrenceTime >= '2018-06-06 00:00:00'  AND dbmADRLV3.dbo.LV3_TrcAction.OccurrenceTime <= '2018-06-13 23:59:59'  
  ORDER BY dbo.LV3_TrcAction.OccurrenceTime desc