Search in sources :

Example 1 with EncounterCohortDefinition

use of org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition in project openmrs-module-pihcore by PIH.

the class PihCohortDefinitionLibrary method getAdmissionAtLocationDuringPeriod.

@DocumentedDefinition(value = "admissionAtLocationDuringPeriod")
public CohortDefinition getAdmissionAtLocationDuringPeriod() {
    EncounterCohortDefinition cd = new EncounterCohortDefinition();
    cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
    cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
    cd.addParameter(new Parameter("locationList", "reporting.parameter.location", Location.class));
    cd.addEncounterType(Metadata.lookup(EncounterTypes.ADMISSION));
    return new MappedParametersCohortDefinition(cd, "onOrAfter", "startDate", "onOrBefore", "endDate", "locationList", "location");
}
Also used : Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) EncounterCohortDefinition(org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition) DiedSoonAfterEncounterCohortDefinition(org.openmrs.module.pihcore.reporting.cohort.definition.DiedSoonAfterEncounterCohortDefinition) Date(java.util.Date) Location(org.openmrs.Location) MappedParametersCohortDefinition(org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Aggregations

Date (java.util.Date)1 Location (org.openmrs.Location)1 DiedSoonAfterEncounterCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiedSoonAfterEncounterCohortDefinition)1 EncounterCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition)1 MappedParametersCohortDefinition (org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition)1 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)1 Parameter (org.openmrs.module.reporting.evaluation.parameter.Parameter)1