use of org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition 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");
}
use of org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition in project openmrs-module-pihcore by PIH.
the class PihCohortDefinitionLibrary method getDiedSoonAfterAdmissionDuringPeriod.
@DocumentedDefinition(value = "diedSoonAfterAdmissionDuringPeriod")
public CohortDefinition getDiedSoonAfterAdmissionDuringPeriod() {
DiedSoonAfterEncounterCohortDefinition cd = new DiedSoonAfterEncounterCohortDefinition();
cd.setEncounterType(emrApiProperties.getAdmissionEncounterType());
cd.addParameter(new Parameter("diedOnOrAfter", "mirebalaisreports.parameter.diedOnOrAfter", Date.class));
cd.addParameter(new Parameter("diedOnOrBefore", "mirebalaisreports.parameter.diedOnOrBefore", Date.class));
return new MappedParametersCohortDefinition(cd, "diedOnOrAfter", "startDate", "diedOnOrBefore", "endDate");
}
Aggregations