As shown in the table, in the first column they are regimens taken by
patients in a certain period and you know well that in openmrs there is no
table which holds patient *regimens *(I mean for
instance*Zidovudine+lamivudine+Nevirapine
*).
To come up, I have defined some method in *DAO  *which takes all patients
having drug orders before some period and I loop through and try to keep
each patient's regimen.It's not really easy but it works elsewhere!!!!
When the method is invoked it needs the *enddate *as parameter (the another
purpose as Mike said).

It is feasible in the controller as follows:

EvaluationContext context = new EvaluationContext();
                Date endDate=(Date)context.getParameterValue("endDate");

                     OR

Date  endDate = (Date) dataSet.getContext().getParameterValue(" endDate ");

But when when I try to do so in the class where cohorts and indicators are
defined and added to the report, I just get the null value!!!!!
I tried to define also the endDate as static to make it accessible
and I've got the compiler error.....

========================================================================================
My method in *dao *looks like this:* public List<ArrayList<Integer>>
getRegimenComposition(Date date) {}*
and I want to call it from the class where I add indicators to the report
like this:
* List<ArrayList<Integer>> regimens =
Context.getService(QuarterReportingService.class).getRegimenComposition(endDate);
*

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to