use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getSingleObsInEncounter.
@DocumentedDefinition
public EncounterDataDefinition getSingleObsInEncounter(Concept concept) {
ObsForEncounterDataDefinition d = new ObsForEncounterDataDefinition();
d.setQuestion(concept);
d.setSingleObs(true);
return d;
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getNumberOfProviders.
@DocumentedDefinition
public EncounterDataDefinition getNumberOfProviders() {
EncounterProviderDataDefinition dd = new EncounterProviderDataDefinition();
dd.setSingleProvider(false);
return new ConvertedEncounterDataDefinition(dd, new CountConverter());
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getEncounterProvider.
@DocumentedDefinition
public EncounterDataDefinition getEncounterProvider() {
EncounterProviderDataDefinition epdd = new EncounterProviderDataDefinition();
epdd.setSingleProvider(true);
return new ConvertedEncounterDataDefinition(epdd, new DataConverter[] { new ObjectFormatter() });
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterQueryLibrary method getEncountersDuringPeriodAtLocation.
@DocumentedDefinition(value = "encountersDuringPeriodAtLocation")
public EncounterQuery getEncountersDuringPeriodAtLocation(List<EncounterType> encounterTypes) {
BasicEncounterQuery q = new BasicEncounterQuery();
q.setWhich(TimeQualifier.ANY);
q.setEncounterTypes(encounterTypes);
q.addParameter(parameter(Date.class, "onOrAfter"));
q.addParameter(parameter(Date.class, "onOrBefore"));
q.addParameter(parameter(Location.class, "locationList"));
return new MappedParametersEncounterQuery(q, ObjectUtil.toMap("onOrAfter=startDate,onOrBefore=endDate,locationList=location"));
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihObsQueryLibrary method getObsDuringPeriod.
@DocumentedDefinition(value = "obsDuringPeriod")
public ObsQuery getObsDuringPeriod(List<Concept> questionConcepts) {
BasicObsQuery q = new BasicObsQuery();
q.setConceptList(questionConcepts);
q.addParameter(parameter(Date.class, "onOrAfter"));
q.addParameter(parameter(Date.class, "onOrBefore"));
return new MappedParametersObsQuery(q, ObjectUtil.toMap("onOrAfter=startDate,onOrBefore=endDate"));
}
Aggregations