"Data Export" reporting - date of enrollment issue

We are working in the “Data Export” reporting function. However, when I search by “Date of Enrollment” for a program, it appears to not show any dates of enrollment in the future.

To give a little background, we are using “Programs” as a way to make appointments, thus the date of enrollment is the date of the next appointment. It appeared to be reasonable, because there is a way to export data easily for a program’s “Date of Enrollment,” but I am not sure why the only data it extracts is for dates in the past. Is this something you have seen before? Or do you have any ideas what a fix may be? I do not know if there is a setting somewhere that does not allow future dates.

Any insight you have would be wonderful, or any ideas on work-arounds to get the same data out.

@kate, can you let us know more details about what piece of the software you’re using? (What version of OpenMRS Platform? Is it the Reference Application or the legacy UI? What module are you talking about doing this export in?)

@darius I apologize! I am using Version 1.9.9 BuildA595f9 and referring to the ReportingCompatability module v. 1.5.8. I’m not sure how to find whether it is Reference Application or legacy UI.

Thank you so much

1 Like

(FYI this is the legacy UI. The Reference Application is the newer application that you see on demo.openmrs.org)

I haven’t used the functions in Reporting Compatibility in a long time. Can you copy/paste (or include screenshots) illustrating the problem?

I understand you to be saying that you have (a) enrolled some patients in a program, with enrollment date in the future. But when you (b) run a data export, these patients are not included.

But when I try to do (a) on demo.openmrs.org, I get the error message “Enrolled date can’t be in future, Please select a date on or before today”, so maybe I’m not understanding what you’re doing.

PS- if you really want to manage appointments, you should consider the Appointment Scheduling Module, which is expressly made for this purpose.

Thanks!

I hope these help:

This is how the data export form is set up: There is a simple column for date of enrollment in a program.

The CSV file that comes out looks like this (and as you can see, there are no dates past feb 2016):

However, the “Enrollment date” for our programs can in fact be in the future

From what the director of our program tells me, he did not change anything to allow program enrollment dates in the future.

The reason we are not currently using Appointment module is, also according to him, because this is more for a month-by-month scheduling, not exact down to date/time, and thus the Appointment module is too specific and doesn’t leave room for the flexibility we need (our staff build schedules on a month by month basis, so scheduling something for a specific date/time 3 months out or more does not make sense)

Thank you again for your help!

I checked, and the validation that program enrollments aren’t allowed to be in the future was added in Platform version 1.11.0 via

So FYI, be aware that when/if you upgrade, this is going to break. (A more correct usage of the data model would be to have a concept with datatype=Date like “Fecha de proximo seguimiento de presión alta”, and store observations for the patient against this concept.)

Looking at the code underneath the data export, this line of code actually does restrict to enrollment date <= now: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/api/db/hibernate/HibernatePatientSetDAO.java#L1536

I guess my advice is that if you can, to change things around so that instead of using Program Enrollments to represent this data, you use something else (presumably Observations). If that’s not an option, I guess you will need to actually go in and modify the reportingcompatibility module’s code to export this data in a different way…

1 Like