Report Name: Month to Date Intake Non Bring Forward and Bring Forward Cases Report
Overview
  • Queries: 7

    Layouts: 1

  • Model: /PCR/PCR Deployment/PCR Packages/packagePCR-RCP/ name: model
Queries
  • Queries 7
    Expressions:
  • Model: /PCR/PCR Deployment/PCR Packages/packagePCR-RCP/ name: model
  • Query
    Last Valid Date
    Data Items
    1
    report run time
    current_time
  • Query
    Non BF Cases
    Data Items
    3
    Yesterday
    IF ( ?Report Type?= '1')
    THEN
    ( _add_days(current_date, -1)
    )
    ELSE
    (
    if (?pReport_Month?<>'20991231' )
    then ( _last_of_month (cast(?pReport_Month?, date)))
    else ( _last_of_month ( _add_months (current_date, -1 )))
    )
    First Day of Current Month
    IF ( ?Report Type?='1' )
    THEN
    ( _first_of_month (current_date)
    )
    ELSE
    ( if (?pReport_Month?<>'20991231' )
    then ( _first_of_month (cast (?pReport_Month?, date)))
    else ( _first_of_month ( _add_months (current_date, -1 )))
    )
    Non BF Cases
    [Presentation].[Case].[Case Count]
    • Detail Filters
      3
    • Required
      cast([Presentation].[Case].[DATE_OPEN_EST], date) between [First Day of Current Month] and [Yesterday]
    • Required
      [Presentation].[Case].[DATE_BF_EST] is null
    • Optional
      ?Report Type?='1' or
      (?Report Type?='2' and ?pReport_Month?='20991231') or
      (?Report Type?='2' and cast(?pReport_Month?, date)<=current_date )
  • Query
    BF Cases
    Data Items
    3
    Yesterday
    IF ( ?Report Type?= '1' )
    THEN
    ( _add_days(current_date, -1)
    )
    ELSE
    (
    if (?pReport_Month?<>'20991231' )
    then ( _last_of_month (cast(?pReport_Month?, date)))
    else ( _last_of_month ( _add_months (current_date, -1 )))
    )
    First Day of Current Month
    IF ( ?Report Type?='1' )
    THEN
    ( _first_of_month (current_date)
    )
    ELSE
    ( if (?pReport_Month?<>'20991231' )
    then ( _first_of_month (cast (?pReport_Month?, date)))
    else ( _first_of_month ( _add_months (current_date, -1 )))
    )
    BF Cases
    [Presentation].[Case].[Case Count]
    • Detail Filters
      2
    • Required
      cast([Presentation].[Case].[DATE_BF_EST], date)
      between [First Day of Current Month] and [Yesterday]
    • Optional
      ?Report Type?='1' or
      (?Report Type?='2' and ?pReport_Month?='20991231') or
      (?Report Type?='2' and cast(?pReport_Month?, date)<=current_date )
  • Query
    CA cases
    Data Items
    3
    Yesterday
    IF ( ?Report Type?= '1' )
    THEN
    ( _add_days(current_date, -1)
    )
    ELSE
    ( if (?pReport_Month?<>'20991231' )
    then ( _last_of_month (cast(?pReport_Month?, date)))
    else ( _last_of_month ( _add_months (current_date, -1 )))
    )
    First Day of Current Month
    IF ( ?Report Type?='1' )
    THEN
    ( _first_of_month (current_date)
    )
    ELSE
    ( if (?pReport_Month?<>'20991231' )
    then ( _first_of_month (cast (?pReport_Month?, date)))
    else ( _first_of_month ( _add_months (current_date, -1 )))
    )
    CA Cases
    [Presentation].[Case].[Case Count]
    • Detail Filters
      4
    • Required
      cast( [Presentation].[Case].[DATE_OPEN_EST], date) between [First Day of Current Month] and [Yesterday]
    • Required
      [Presentation].[Case].[DATE_BF_EST] is null
    • Required
      [Presentation].[Work Type].[WORK_TYPE_CODE] in ('WT-057','WT-058')
    • Optional
      ?Report Type?='1' or
      (?Report Type?='2' and ?pReport_Month?='20991231') or
      (?Report Type?='2' and cast(?pReport_Month?, date)<=current_date )
  • Query
    Non BF and BF Cases
    Join
    [Non BF Cases].[Yesterday] = [BF Cases].[Yesterday]
    refQuery
    Non BF Cases
    0:1
    refQuery
    BF Cases
    0:1
    Data Items
    3
    Yesterday
    [Non BF Cases].[Yesterday]
    Non Bf Cases
    [Non BF Cases].[Non BF Cases]
    BF Cases
    [BF Cases].[BF Cases]
  • Query
    Main
    Join
    [Non BF and BF Cases].[Yesterday] = [CA cases].[Yesterday]
    refQuery
    Non BF and BF Cases
    0:1
    refQuery
    CA cases
    0:1
    Data Items
    10
    CA Cases
    coalesce([CA cases].[CA Cases],0)
    Non Bf Cases
    coalesce([Non BF and BF Cases].[Non Bf Cases],0)
    BF Cases
    coalesce([Non BF and BF Cases].[BF Cases],0)
    Total Cases
    [BF Cases] + [Non Bf Cases]
    Month
    If (?Report Type? ='1')
    then ( datename ({mm}, current_date))
    else (
    if ([month_prompt]<>'20991231')
    then
    (datename ({mm},cast([month_prompt], date)))
    else
    (datename ({mm}, _add_months (current_date, -1)))
    )
    Display Month French
    Case #sq($[Language_lookup]{$runLocale})#
    When 'EN' then
    [Month]
    When 'FR' then
    Case
    when [Month] = 'January' then 'janvier'
    when [Month] = 'February' then 'février'
    when [Month] = 'March' then 'mars'
    when [Month] = 'April' then 'avril'
    when [Month] = 'May' then 'mai'
    when [Month] = 'June' then 'juin'
    when [Month] = 'July' then 'juillet'
    when [Month] = 'August' then 'août'
    when [Month] = 'September' then 'septembre'
    when [Month] = 'October' then 'octobre'
    when [Month] = 'November' then 'novembre'
    when [Month] = 'December' then 'décembre'
    end
    end
    report_type_prompt
    ?Report Type?
    month_prompt
    ?pReport_Month?
    Last Day - from prompt
    _day (
    if ([month_prompt]<>'20991231')
    then
    (
    _last_of_month (cast([month_prompt], date))
    )
    else
    ( _last_of_month (_add_months (current_date, -1))
    )
    )
    Year - from Prompt
    _year (
    if ([month_prompt]<>'20991231')
    then
    (
    _last_of_month (cast([month_prompt], date))
    )
    else
    ( _last_of_month (_add_months (current_date, -1))
    )
    )
  • Query
    Month_Prompt
    Data Items
    5
    Full Date
    cast([Presentation].[BF Date Dim].[FullDate], date)
    year_month_prompt
    cast(extract (year, [Full Date]), varchar(4))|| ' - '||[Month Name Short]
    Date Key
    [Presentation].[BF Date Dim].[DateKey]
    sort
    sort: descending descending
    last day of selected month
    cast ([Presentation].[BF Date Dim].[FullDate], date)
    Month Name Short
    [Presentation].[BF Date Dim].[MonthName_Short]
    • Detail Filters
      1
    • Required
      ?Report Type? = '2' and [Presentation].[BF Date Dim].[IsLastDayOfMonth] ='Y' and [Presentation].[BF Date Dim].[FullDate] < _add_months ( getdate (), -1 )
Layouts