Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #912 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

Data export of patient program information not working correctly

Reported by: jmiranda Assigned to: jmiranda
Priority: critical Milestone: OpenMRS 1.3
Component: OpenMRS Code Base Keywords:
Cc: Introductory Ticket:

Description

================================================================ Email from Evan Waters(ewaters@pih.org) on 04 July 2008 10:12am ================================================================ "Data export is not generating program information, ie 'Treatment Status' and 'Enrollment Date'. These come up blank, but other values seem to be generated just fine."

Change History

07/15/08 18:52:59 changed by jmiranda

The issue issue due to a change made in changeset [4150] ("Reorganized options in Data Export simple column to order suggested by Cheryl and Ada. You may now pick any program, workflow, or drug set, instead of just the PIH ones.").

The simpleColumns.jsp used to have columns of the form:

$fn.getProgram('HIV PROGRAM').getDateEnrolled())

which were specific to PIH patient programs. The solution was to use the openmrs tag lib 'forEachRecord' function and iterate over all programs in the system.

<openmrs:forEachRecord name="workflowProgram">

$fn.getProgram('${record.programId}').getDateEnrolled())}

</openmrs:forEachRecord>

However, this solution uses the program ID instead of the program name. The DataExportFunction.getProgram() expects a string 'name' argument, so when it receives a string that represents the program ID, it cannot find the correct program.

07/15/08 18:54:10 changed by jmiranda

  • status changed from new to assigned.

07/15/08 18:54:35 changed by jmiranda

The solution was to change the DataExportFunction.getProgram() method to accept a string parameter and then look up the program by ID (first) and name (second). The ProgramWorkflowService has a getProgram() method for both ID and name, so this works without needing an API change.

Another solution would be to remove the quotes around the input parameter to getProgram() within simpleColumn.jsp and add a new DataExportFunction.getProgram(Integer id) that accepts an integer value instead of a string value.

07/15/08 19:20:14 changed by jmiranda

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in changeset [4944].

07/16/08 13:25:04 changed by bwolfe

  • milestone changed from OpenMRS 1.4 to OpenMRS 1.3.