Details
-
New Feature
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
Medium
Description
(see email discussion: http://openmrs-mailing-list-archives.1560443.n2.nabble.com/Question-about-Logic-Service-and-Reporting-Framework-tp5685603p5688133.html)
Do something like this:
/** RENAME THIS! * Fetches a single data item for each member of a cohort */ interface DataFetcher extends Definition { /** returns a map from each member id in the cohort to the fetched data item */ public Map<Integer, Object> fetchData(Cohort cohort) } /** Always has an 'indexDate' parameter, in addition to whatever parameters come from the parsed logic expression */ class LogicDataFetcher implements DataFetcher { private String logicExpression; ... }