Skip to content

Commit

Permalink
add codedObsSearchAdvanced observation cohort definition library
Browse files Browse the repository at this point in the history
  • Loading branch information
emekanwankwo authored and mseaton committed May 9, 2017
1 parent 979b7f4 commit 3676ce2
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
import org.openmrs.Form;
import org.openmrs.PersonAttributeType;
import org.openmrs.Program;
import org.openmrs.Concept;
import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition;
import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition;
import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
Expand All @@ -28,6 +29,7 @@
import org.openmrs.module.reporting.cohort.definition.ProgramEnrollmentCohortDefinition;
import org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition;
import org.openmrs.module.reporting.definition.library.BaseDefinitionLibrary;
import org.openmrs.module.reporting.cohort.definition.CodedObsCohortDefinition;
import org.openmrs.module.reporting.definition.library.DocumentedDefinition;
import org.openmrs.module.reporting.evaluation.parameter.Parameter;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -107,6 +109,16 @@ public CohortDefinition getAnyEncounterDuringPeriod() {
return new MappedParametersCohortDefinition(cd, "onOrAfter", "startDate", "onOrBefore", "endDate");
}

@DocumentedDefinition("codedObsSearchAdvanced")
public CohortDefinition getCodedObsSearchAdvanced() {
CodedObsCohortDefinition cd = new CodedObsCohortDefinition();
cd.addParameter(new Parameter("timeModifier", "reporting.parameter.timeModifier", CodedObsCohortDefinition.TimeModifier.class));
cd.addParameter(new Parameter("question", "reporting.parameter.question", Concept.class));
cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
return cd;
}

@DocumentedDefinition("encounterSearchAdvanced")
public CohortDefinition getAnyEncounterDuringPeriodWithOccurrence() {
EncounterCohortDefinition cd = new EncounterCohortDefinition();
Expand Down

0 comments on commit 3676ce2

Please sign in to comment.