Search in sources :

Example 6 with CompositionCohortDefinition

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

the class DailyCheckInsDataSetManager method checkInSplitByPriorConsultation.

private Mapped<CohortDefinition> checkInSplitByPriorConsultation(String columnName, Mapped<CohortDefinition> checkInWithReason, Mapped<CohortDefinition> priorConsult, boolean included) {
    CompositionCohortDefinition cd = new CompositionCohortDefinition();
    cd.setName(columnName);
    cd.setDescription(columnName);
    cd.addParameter(getDayParameter());
    cd.addParameter(getLocationParameter());
    cd.addSearch("checkInWithReason", checkInWithReason);
    cd.addSearch("priorConsult", priorConsult);
    cd.setCompositionString("checkInWithReason " + (included ? "AND" : "AND NOT") + " priorConsult");
    return Mapped.mapStraightThrough(cd);
}
Also used : CompositionCohortDefinition(org.openmrs.module.reporting.cohort.definition.CompositionCohortDefinition)

Aggregations

CompositionCohortDefinition (org.openmrs.module.reporting.cohort.definition.CompositionCohortDefinition)6 EncounterCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition)5 Date (java.util.Date)4 CohortDefinition (org.openmrs.module.reporting.cohort.definition.CohortDefinition)4 Location (org.openmrs.Location)3 DiagnosisCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiagnosisCohortDefinition)3 DiedSoonAfterEncounterCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiedSoonAfterEncounterCohortDefinition)3 InpatientLocationCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientLocationCohortDefinition)3 InpatientTransferCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientTransferCohortDefinition)3 LastDispositionBeforeExitCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.LastDispositionBeforeExitCohortDefinition)3 EncounterWithCodedObsCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterWithCodedObsCohortDefinition)3 MappedParametersCohortDefinition (org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition)3 PersonAttributeCohortDefinition (org.openmrs.module.reporting.cohort.definition.PersonAttributeCohortDefinition)3 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)3 EncounterType (org.openmrs.EncounterType)2 Parameter (org.openmrs.module.reporting.evaluation.parameter.Parameter)2 VisitCohortDefinition (org.openmrs.module.reporting.cohort.definition.VisitCohortDefinition)1 CohortsWithVaryingParametersDataSetDefinition (org.openmrs.module.reporting.dataset.definition.CohortsWithVaryingParametersDataSetDefinition)1 PatientDataSetDefinition (org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition)1