Search in sources :

Example 1 with PatientEncounterQuery

use of org.openmrs.module.reporting.query.encounter.definition.PatientEncounterQuery in project openmrs-module-pihcore by PIH.

the class BaseEncounterDataSetManager method constructDataSet.

public DataSetDefinition constructDataSet() {
    EncounterDataSetDefinition dsd = new EncounterDataSetDefinition();
    dsd.addParameter(new Parameter("startDate", "mirebalaisreports.parameter.startDate", Date.class));
    dsd.addParameter(new Parameter("endDate", "mirebalaisreports.parameter.endDate", Date.class));
    // Rows defined as patients who had an encounter of the configured types during the given period
    dsd.addRowFilter(Mapped.mapStraightThrough(new PatientEncounterQuery(cohortQueries.getExcludeTestPatients())));
    dsd.addRowFilter(Mapped.mapStraightThrough(encounterQueries.getEncountersDuringPeriodAtLocation(getEncounterTypes())));
    // Define columns
    addPrimaryIdentifierColumns(dsd);
    addPatientNameColumns(dsd);
    addBirthDateAndAgeColumns(dsd);
    addGenderColumns(dsd);
    addOtherIdentifierColumns(dsd);
    addCoreEncounterColumns(dsd);
    addCoreVisitColumns(dsd);
    addAddressColumns(dsd);
    addPersonAttributeColumns(dsd);
    addObsColumns(dsd);
    addAuditColumns(dsd);
    return dsd;
}
Also used : PatientEncounterQuery(org.openmrs.module.reporting.query.encounter.definition.PatientEncounterQuery) Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) EncounterDataSetDefinition(org.openmrs.module.reporting.dataset.definition.EncounterDataSetDefinition) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 EncounterDataSetDefinition (org.openmrs.module.reporting.dataset.definition.EncounterDataSetDefinition)1 Parameter (org.openmrs.module.reporting.evaluation.parameter.Parameter)1 PatientEncounterQuery (org.openmrs.module.reporting.query.encounter.definition.PatientEncounterQuery)1