Skip to main content

SYS.Monitor.Health.Period

persistent class SYS.Monitor.Health.Period extends %Library.Persistent, %XML.Adaptor

SQL Table Name: SYS_Monitor_Health.Period

Defines time Periods for evaluation of Health Monitor Sensors. Default is 63 weekly periods, nine Periods for each day of the week.

Property Inventory

Method Inventory

Properties

property Day as %Integer [ InitialExpression = 0 , Required ];
Day. 1-7 for weekly, 1-31 or 99 for others
Property methods: DayDisplayToLogical(), DayGet(), DayGetStored(), DayIsValid(), DayLogicalToDisplay(), DayNormalize(), DaySet(), DayXSDToLogical()
property Description as %String (MAXLEN = 250);
Recurrance: every day at (start/end), every week on day (default) every month on day of month or "last day of month" every 3 months (quarterly) on day of month or "last day of month" every year on month and day of month or "last day of month" Description of the interval
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property EndTime as %Integer [ InitialExpression = -1 , Required ];
End time
Property methods: EndTimeDisplayToLogical(), EndTimeGet(), EndTimeGetStored(), EndTimeIsValid(), EndTimeLogicalToDisplay(), EndTimeNormalize(), EndTimeSet(), EndTimeXSDToLogical()
property Month as %String [ InitialExpression = 0 , Required ];
Month - Quarterly or yearly
Property methods: MonthDisplayToLogical(), MonthGet(), MonthGetStored(), MonthIsValid(), MonthLogicalToDisplay(), MonthLogicalToOdbc(), MonthNormalize(), MonthSet()
property Recurrence as %Integer [ InitialExpression = 1 , Required ];
Recurrence - weekly-1, monthly-2, quarterly-3, yearly-4
Property methods: RecurrenceDisplayToLogical(), RecurrenceGet(), RecurrenceGetStored(), RecurrenceIsValid(), RecurrenceLogicalToDisplay(), RecurrenceNormalize(), RecurrenceSet(), RecurrenceXSDToLogical()
property StartTime as %Integer [ InitialExpression = -1 , Required ];
Start time
Property methods: StartTimeDisplayToLogical(), StartTimeGet(), StartTimeGetStored(), StartTimeIsValid(), StartTimeLogicalToDisplay(), StartTimeNormalize(), StartTimeSet(), StartTimeXSDToLogical()

Methods

classmethod Create(Rec As %Integer, Start As %String, End As %String, Day As %Integer, Desc As %String = "", Month As %Integer = 0) as %Status
Create a Period. Start and End time is 24-hour time format. Recurrence - weekly-1, monthly-2, quarterly-3, yearly-4 Day = day of week (1-7) for weekly recurrence, day of month (1-31 or 99 for "end of month") for all other recurrence.
classmethod Delete(PeriodId As %String) as %Status
Delete a Period
classmethod Modify(Period As %Integer, Start As %String = "", End As %String = "", Day As %Integer = 0, Rec As %Integer = 0, Desc As %String = "", Month As %Integer = 0) as %Status
Modify a Period.
classmethod TodayPeriodsClose(ByRef qHandle As %Binary) as %Status
classmethod TodayPeriodsExecute(ByRef qHandle As %Binary) as %Status
classmethod TodayPeriodsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod Validate(Start As %String, End As %String, Rec As %Integer, Day As %Integer, Month As %Integer, ByRef startsecs As %Integer, ByRef endsecs As %Integer) as %Status

Queries

query MPeriods(day As %Integer)
SQL Query:
SELECT StartTime,EndTime,%ID FROM Period WHERE (Recurrence = 2) AND (Day = :day) ORDER BY StartTime
Get all periods for day - Monthly recurrence
query PeriodDescriptions()
SQL Query:
SELECT %ID,Description FROM Period ORDER BY Recurrence,Month,Day,StartTime
Get period descriptions, order by Recurrence
query PeriodDescriptionsDay(day As %Integer)
SQL Query:
SELECT %ID,Description FROM Period WHERE (Day = :day) ORDER BY Day,StartTime
Get period descriptions by Day
query PeriodDescriptionsID()
SQL Query:
SELECT %ID,Description FROM Period ORDER BY %ID
Get period descriptions, order by ID
query QPeriods(day As %Integer, month As %Integer)
SQL Query:
SELECT StartTime,EndTime,%ID FROM Period WHERE (Recurrence = 3) AND ((Day = :day)AND(Month = :month)) ORDER BY StartTime
Get all periods for day - quarterly recurrence
query TodayPeriods()
Selects Start As %Integer, End As %Integer, ID As %String, Description As %String
query WPeriods(day As %Integer)
SQL Query:
SELECT StartTime,EndTime,%ID FROM Period WHERE (Recurrence = 1) AND (Day = :day) ORDER BY StartTime
Get all periods for day - weekly recurrence
query YPeriods(day As %Integer, month As %Integer)
SQL Query:
SELECT StartTime,EndTime,%ID FROM Period WHERE (Recurrence = 4) AND ((Day = :day)AND(Month = :month)) ORDER BY StartTime
Get all periods for day - yearly recurrence

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (SYS.Monitor.Health.Period)

^ISC.Monitor.Health.PeriodD(ID)
=
%%CLASSNAME
Description
StartTime
EndTime
Days
DayWeek
DayMonth
Recurrence
DayofWeek
DayofMonth
MonthandDay
Day
Month
Group
FeedbackOpens in a new tab