Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Cohort Builder 
    1. Go into Cohort Builder and click on the Patient Attributes tab
    2. Next to age, enter a minimum age of 15, and click search.  This will return all patients at least 15 years old.
    3. To the right of the results here, click on the Save icon, and name this "Adults"
  2. Manage Patient Searches
    1. Click Manage Patient Searches from the Admin page
    2. Click into the "Adults" patient search that you created.  You'll see that this is defined as a 'org.openmrs.reporting.PatientCharacteristicFilter' with an attribute of "minAge" set to 15.
    3. Now, to know exactly what other attributes are available, you may need to look at the Java code.  In this case, looking at the PatientCharacteristicFilter java class, we can see that the following are available to set:  gender, minBirthdate, maxBirthdate, minAge, maxAge, aliveOnly, deadOnly, effectiveDate.  We can add in any of these that we want at this point - most should have been available to set via our search in step 1 with Cohort Builder, but others, such as effective date, need to be added here.
    4. Under "Add a new search argument:", add in:
      1. Name:  "effectiveDate"  -- this must match exactly with the property name from PatientCharacteristicFilter
      2. Value:  ${date} -- the important thing here is that the value contains ${ }.  This tells the reporting engine that this is a parameter, not a fixed value
      3. Java Class:  "java.util.Date"  --  this should be set to the Java class name of the parameter (in this case, it's a Date)
  3. Manage Reports
    1. Click Manage Reports on the Admin page
    2. Click Create Cohort Report (to create), or click on the name of an existing Cohort Report (to edit)
    3. Fill in a name and description and save.  Once saved, you will have access to the next workflow steps.
    4. Click to the 'Parameters' tab
    5. Click 'Add new parameter' for each parameter your report contains.  Typically you will want "name" to contain no spaces.  In our case we want:  Name: reportDate; Display Label:  Date of the Report;  Type:  Date
    6. Click to the 'Indicators' tab and follow the instructions as listed.  In our case, we're just going to add one indicator using the saved Patient Search we created above:
      1. Indicator:  1
      2. Description:  Number of adults on the date of the report
      3. Click into the text field for Indicator Specification.  Then click, from the right hand menu, the patient search you want (in our case, it should be [Adults|effectiveDate=${?}].
      4. Replace the "?" in the above indicator specification with the parameter name from your report.  In our case, it would change to:  [Adults|effectiveDate=${reportDate}]
  4. Run Report
    1. Click Run Reports on the Admin page
    2. Click on the Test Report link
    3. Try entering different values for the "Report Date" parameter and clicking Run Report for Cohort report web preview.  It should work!

Release Notes

  • 1.5.7
    • Fixed Row per obs data export editing: RCM-66
  • 1.5.3
    • Changed dependencies so that there are no 1.8 dependencies and is compatible with 1.5.x and up.
    • Copied the PatientSetService/Impl/DAO/HibernateDAO into the module as the ReportingCompatibilityService, changed references in DataExportFunctions to refer to this service 
    • Changed the implementation of 2 methods:  getPatientPrograms and getDrugOrders, to improve DataExport performance - RCM-46
  • 1.5.2.1
    • Added NPE catch in report controller in case someone didn't provide a reportId - RCM-45
  • 1.5.2
    • Sped up data exports and forced them to use less memory (less OOMs) - RCM-20 (requires 1.8 for full speed up effect)
    • Fixed some spelling errors in translation messages
  • 1.5.1.5
    • Fixed a few messages.properties translation elements
    • Significant speedup for program and drugorder data exports
    • Significant speedup for identifier data exports (1.8+ only)