[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openmrs-implementers
Subject:    Re: Reporting schedules
From:       Michael Seaton <mseaton () pih ! org>
Date:       2013-01-23 16:44:22
Message-ID: 51001366.1040708 () pih ! org
[Download RAW message or body]

Hi Jeremy,

The ticket that James points you to is the one that would support this 
most easily.  This is something that James has been asking for in an 
upcoming Sprint, so hopefully will be addressed soon.

That being said, I assume that you are actually defining your reports in 
code in a module, not via the UI.  In this case, you should be able to 
do what you want to do now by just iterating across all of the Locations 
you want to include, and including your data set once per Location, 
varying the value for the Location parameter that you pass into it each 
time.  So if you have 6 Locations you want to include in the report 
output, your report would end up with 6 datasets in it.  And then you 
just need to use an appropriate renderer / report design to output the 
results from these 6 datasets as needed in your output.

Regarding scheduling, as James says you can schedule a report to run 
periodically (eg. daily, weekly, montly, or via a custom cron 
expression).  The parameters that the report takes in (eg. Report Date) 
can be hard-coded, or can use expressions.  So, if you want the value of 
the report date parameter to be taken from the date/time that the report 
is run, you would configure this as an "expression" with a value of 
"${now}".  For more details on this see here:
https://wiki.openmrs.org/display/docs/Running+and+Scheduling+Reports

Hopefully this answers some of your questions.  Happy to discuss further.

Cheers,
Mike


On 01/23/2013 10:54 AM, James Arbaugh wrote:
>
> Hi Jeremy,
>
> I think what you want to do with multiple locations is a new feature 
> request. Please cast your vote.
>
> https://tickets.openmrs.org/browse/REPORT-114
>
> For now, I assume you would just need to schedule each location to run 
> independently.
>
> You can schedule your report using expressions based on when the 
> report is run.  For example, we have a weekly mortality report that 
> gets run automatically every Tuesday per a schedule for the previous 
> week.  We scheduled it one time, and it always gives us the report for 
> the specific dates of the previous week.
>
> Start date: ${start_of_today-9d}
>
> End date: ${end_of_today-3d}
>
> We have similar reports that are scheduled daily and monthly.
>
> Thanks,
>
> James
>
> *From:*implementers@openmrs.org [mailto:implementers@openmrs.org] *On 
> Behalf Of *Jeremy Keiper
> *Sent:* Wednesday, January 23, 2013 10:11 AM
> *To:* implementers@openmrs.org
> *Subject:* Reporting schedules
> *Importance:* Low
>
> Mike, thanks for the Reporting rundown today on OpenMRS University! 
>  Anyone that missed it, check out the screencast 
> <http://www.youtube.com/watch?v=M57eW3begCg>.
>
> I would like to know about scheduling.  We have a monthly report that 
> needs to be prepared for multiple locations.  The location will be a 
> parameter to the report, and I presume a date signifying the end of 
> the previous month.  Will we need to create multiple schedules, one 
> for each location, or can we request a single run of the report and 
> then ask for a breakdown by location?  These are row-per-patient 
> reports, and some patients could fall into multiple locations.  Also, 
> can the schedule be recurring with the date being automatically 
> decided based on when it was run?
>
> Thanks again!
>
>
> Jeremy Keiper
> OpenMRS Core Developer
> AMPATH / IU-Kenya Support
>
> -- 
> OpenMRS Implementers: http://go.openmrs.org/implementers
> Post: implementers@openmrs.org <mailto:implementers@openmrs.org>
> Unsubscribe: implementers+unsubscribe@openmrs.org 
> <mailto:implementers+unsubscribe@openmrs.org>
> Manage your OpenMRS subscriptions at https://id.openmrs.org/
>
> -- 
> OpenMRS Implementers: http://go.openmrs.org/implementers
> Post: implementers@openmrs.org
> Unsubscribe: implementers+unsubscribe@openmrs.org
> Manage your OpenMRS subscriptions at https://id.openmrs.org/
>
>

-- 
OpenMRS Implementers: http://go.openmrs.org/implementers
Post: implementers@openmrs.org
Unsubscribe: implementers+unsubscribe@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/



[Attachment #3 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Jeremy,<br>
    <br>
    The ticket that James points you to is the one that would support
    this most easily.&nbsp; This is something that James has been asking for
    in an upcoming Sprint, so hopefully will be addressed soon.<br>
    <br>
    That being said, I assume that you are actually defining your
    reports in code in a module, not via the UI.&nbsp; In this case, you
    should be able to do what you want to do now by just iterating
    across all of the Locations you want to include, and including your
    data set once per Location, varying the value for the Location
    parameter that you pass into it each time.&nbsp; So if you have 6
    Locations you want to include in the report output, your report
    would end up with 6 datasets in it.&nbsp; And then you just need to use
    an appropriate renderer / report design to output the results from
    these 6 datasets as needed in your output.<br>
    <br>
    Regarding scheduling, as James says you can schedule a report to run
    periodically (eg. daily, weekly, montly, or via a custom cron
    expression).&nbsp; The parameters that the report takes in (eg. Report
    Date) can be hard-coded, or can use expressions.&nbsp; So, if you want
    the value of the report date parameter to be taken from the
    date/time that the report is run, you would configure this as an
    "expression" with a value of "${now}".&nbsp; For more details on this see
    here:<br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="https://wiki.openmrs.org/display/docs/Running+and+Scheduling+Reports">https://wiki.openmrs.org/display/docs/Running+and+Scheduling+Reports</a><br>
  <br>
    Hopefully this answers some of your questions.&nbsp; Happy to discuss
    further.<br>
    <br>
    Cheers,<br>
    Mike<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 01/23/2013 10:54 AM, James Arbaugh
      wrote:<br>
    </div>
    <blockquote
cite="mid:327B5AC12571A049B55BF18232A4DFED68E64E@hasserver001.hashaiti.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi
  Jeremy,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
  think what you want to do with multiple locations is a new
            feature request. Please cast your vote.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><a
  moz-do-not-send="true"
              href="https://tickets.openmrs.org/browse/REPORT-114">https://tickets.openmrs.org/browse/REPORT-114</a><o:p></o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For
  now, I assume you would just need to schedule each location
            to run independently.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">You
  can schedule your report using expressions based on when the
            report is run.&nbsp; For example, we have a weekly mortality
            report that gets run automatically every Tuesday per a
            schedule for the previous week.&nbsp; We scheduled it one time,
            and it always gives us the report for the specific dates of
            the previous week.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Start
  date: ${start_of_today-9d}<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">End
  date: ${end_of_today-3d}<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">We
                
            have similar reports that are scheduled daily and monthly.&nbsp;
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks,<o:p></o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">James<o:p></o:p></span></p>
  <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
 style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
            <a class="moz-txt-link-abbreviated" \
href="mailto:implementers@openmrs.org">implementers@openmrs.org</a> [<a \
class="moz-txt-link-freetext" \
href="mailto:implementers@openmrs.org">mailto:implementers@openmrs.org</a>] <b>On  \
Behalf Of </b>Jeremy Keiper<br>  <b>Sent:</b> Wednesday, January 23, 2013 10:11 \
                AM<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" \
href="mailto:implementers@openmrs.org">implementers@openmrs.org</a><br>  \
<b>Subject:</b> Reporting schedules<br>  <b>Importance:</b> Low<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <p class="MsoNormal">Mike, thanks for the Reporting rundown
            today on OpenMRS University! &nbsp;Anyone that missed it, check
            out <a moz-do-not-send="true"
              href="http://www.youtube.com/watch?v=M57eW3begCg">the
              screencast</a>.<o:p></o:p></p>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">I would like to know about scheduling.
              &nbsp;We have a monthly report that needs to be prepared for
              multiple locations. &nbsp;The location will be a parameter to
              the report, and I presume a date signifying the end of the
              previous month. &nbsp;Will we need to create multiple
              schedules, one for each location, or can we request a
              single run of the report and then ask for a breakdown by
              location? &nbsp;These are row-per-patient reports, and some
              patients could fall into multiple locations. &nbsp;Also, can
              the schedule be recurring with the date being
              automatically decided based on when it was run?<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Thanks again!<br clear="all">
              <o:p></o:p></p>
            <div>
              <p class="MsoNormal"><br>
                Jeremy Keiper<br>
                OpenMRS Core Developer<br>
                AMPATH / IU-Kenya Support<o:p></o:p></p>
            </div>
          </div>
        </div>
        <p class="MsoNormal">-- <br>
          OpenMRS Implementers: <a moz-do-not-send="true"
            href="http://go.openmrs.org/implementers">http://go.openmrs.org/implementers</a><br>
  Post: <a moz-do-not-send="true"
            href="mailto:implementers@openmrs.org">implementers@openmrs.org</a><br>
          Unsubscribe: <a moz-do-not-send="true"
            href="mailto:implementers+unsubscribe@openmrs.org">implementers+unsubscribe@openmrs.org</a><br>
  Manage your OpenMRS subscriptions at <a
            moz-do-not-send="true" \
href="https://id.openmrs.org/">https://id.openmrs.org/</a><br>  &nbsp;<br>
          &nbsp;<o:p></o:p></p>
      </div>
      -- <br>
      OpenMRS Implementers: <a moz-do-not-send="true"
        href="http://go.openmrs.org/implementers">http://go.openmrs.org/implementers</a><br>
                
      Post: <a class="moz-txt-link-abbreviated" \
                href="mailto:implementers@openmrs.org">implementers@openmrs.org</a><br>
                
      Unsubscribe: <a class="moz-txt-link-abbreviated" \
href="mailto:implementers+unsubscribe@openmrs.org">implementers+unsubscribe@openmrs.org</a><br>
  Manage your OpenMRS subscriptions at <a moz-do-not-send="true"
        href="https://id.openmrs.org/">https://id.openmrs.org/</a><br>
      &nbsp;<br>
      &nbsp;<br>
    </blockquote>
    <br>
  </body>
</html>

<p></p>

-- <br />
OpenMRS Implementers: <a \
href="http://go.openmrs.org/implementers">http://go.openmrs.org/implementers</a><br \
                />
Post: implementers@openmrs.org<br />
Unsubscribe: implementers+unsubscribe@openmrs.org<br />
Manage your OpenMRS subscriptions at <a \
href="https://id.openmrs.org/">https://id.openmrs.org/</a><br /> &nbsp;<br />
&nbsp;<br />



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic