Hi @mseaton I have code that constructs a report definition in which indicators are added, these indicators are based on CohortDefinitions.
Now what I want, is to be able to evaluate Patient Data Definition when I am constructing the report, i.e I want to pass the parameters of the report definition to the PatientDataDefinition which I want to evaluate. The data which is returned by PatientDataDefinition is what I what I want to pass as my argument to CohortDefinitions which then will be then will be converted as indicator in the report.
I tried it I can not figure out pass the parameters.
@Override
public ReportDefinition constructReportDefinition() {
ReportDefinition rd = new ReportDefinition();
rd.setUuid(getUuid());
rd.setName(getName());
rd.setDescription(getDescription());
rd.setParameters(getParameters());
CohortIndicatorDataSetDefinition dsd = new CohortIndicatorDataSetDefinition();
dsd.setParameters(getParameters());
rd.addDataSetDefinition("indicators", Mapped.mapStraightThrough(dsd));
CD4PatientDataDefinition cd4 = new CD4PatientDataDefinition()
cd4.setStartDate(from report paramters)
EvaluatedPatientData data = Context.getService(PatientDataService.class).evaluate(cd4,evaluationCotext);
CohortDefinition withCD4 = new CD4CohortDefinition(data.getData())
}