Search in sources :

Example 1 with MappedParametersCohortDefinition

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

the class PihCohortDefinitionLibrary method getClinicalCheckInAtLocation.

@DocumentedDefinition(value = "clinicalCheckInAtLocation")
public CohortDefinition getClinicalCheckInAtLocation() {
    EncounterWithCodedObsCohortDefinition cd = new EncounterWithCodedObsCohortDefinition();
    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.locationList", Location.class));
    cd.addEncounterType(Metadata.lookup(EncounterTypes.CHECK_IN));
    cd.setConcept(conceptService.getConceptByMapping("Type of HUM visit", "PIH"));
    cd.addIncludeCodedValue(conceptService.getConceptByMapping("CLINICAL", "PIH"));
    return new MappedParametersCohortDefinition(cd, "onOrAfter", "startDate", "onOrBefore", "endDate", "locationList", "location");
}
Also used : Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) EncounterWithCodedObsCohortDefinition(org.openmrs.module.reporting.cohort.definition.EncounterWithCodedObsCohortDefinition) Date(java.util.Date) Location(org.openmrs.Location) MappedParametersCohortDefinition(org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 2 with MappedParametersCohortDefinition

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

the class PihCohortDefinitionLibrary method getTransferInToLocationDuringPeriod.

@DocumentedDefinition(value = "transferInToLocationDuringPeriod")
public CohortDefinition getTransferInToLocationDuringPeriod() {
    InpatientTransferCohortDefinition cd = new InpatientTransferCohortDefinition();
    cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
    cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
    cd.addParameter(new Parameter("inToWard", "mirebalaisreports.parameter.inToWard", Location.class));
    return new MappedParametersCohortDefinition(cd, "onOrAfter", "startDate", "onOrBefore", "endDate", "inToWard", "location");
}
Also used : Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) InpatientTransferCohortDefinition(org.openmrs.module.pihcore.reporting.cohort.definition.InpatientTransferCohortDefinition) Date(java.util.Date) Location(org.openmrs.Location) MappedParametersCohortDefinition(org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 3 with MappedParametersCohortDefinition

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

the class PihCohortDefinitionLibrary method lastDispositionBeforeExitHelper.

private CohortDefinition lastDispositionBeforeExitHelper(Concept disposition) {
    LastDispositionBeforeExitCohortDefinition cd = new LastDispositionBeforeExitCohortDefinition();
    cd.addParameter(new Parameter("exitOnOrAfter", "mirebalaisreports.parameter.exitOnOrAfter", Date.class));
    cd.addParameter(new Parameter("exitOnOrBefore", "mirebalaisreports.parameter.exitOnOrBefore", Date.class));
    cd.addParameter(new Parameter("exitFromWard", "mirebalaisreports.parameter.exitFromWard", Location.class));
    cd.setDispositionsToConsider(getDispositionsToConsiderAsExit());
    cd.addDisposition(disposition);
    return new MappedParametersCohortDefinition(cd, "exitOnOrAfter", "startDate", "exitOnOrBefore", "endDate", "exitFromWard", "location");
}
Also used : Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) LastDispositionBeforeExitCohortDefinition(org.openmrs.module.pihcore.reporting.cohort.definition.LastDispositionBeforeExitCohortDefinition) Date(java.util.Date) Location(org.openmrs.Location) MappedParametersCohortDefinition(org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition)

Example 4 with MappedParametersCohortDefinition

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

the class PihCohortDefinitionLibrary method getTransferOutOfLocationDuringPeriod.

@DocumentedDefinition(value = "transferOutOfLocationDuringPeriod")
public CohortDefinition getTransferOutOfLocationDuringPeriod() {
    InpatientTransferCohortDefinition cd = new InpatientTransferCohortDefinition();
    cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
    cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
    cd.addParameter(new Parameter("outOfWard", "mirebalaisreports.parameter.outOfWard", Location.class));
    return new MappedParametersCohortDefinition(cd, "onOrAfter", "startDate", "onOrBefore", "endDate", "outOfWard", "location");
}
Also used : Parameter(org.openmrs.module.reporting.evaluation.parameter.Parameter) InpatientTransferCohortDefinition(org.openmrs.module.pihcore.reporting.cohort.definition.InpatientTransferCohortDefinition) Date(java.util.Date) Location(org.openmrs.Location) MappedParametersCohortDefinition(org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 5 with MappedParametersCohortDefinition

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

the class PihCohortDefinitionLibrary method getInpatientAtLocationOnDate.

@DocumentedDefinition(value = "inpatientAtLocationOnDate")
public CohortDefinition getInpatientAtLocationOnDate() {
    InpatientLocationCohortDefinition cd = new InpatientLocationCohortDefinition();
    cd.addParameter(parameter(Date.class, "effectiveDate"));
    cd.addParameter(parameter(Location.class, "ward"));
    return new MappedParametersCohortDefinition(cd, "ward", "location", "effectiveDate", "date");
}
Also used : InpatientLocationCohortDefinition(org.openmrs.module.pihcore.reporting.cohort.definition.InpatientLocationCohortDefinition) 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)7 MappedParametersCohortDefinition (org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition)7 Location (org.openmrs.Location)6 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)6 Parameter (org.openmrs.module.reporting.evaluation.parameter.Parameter)6 DiedSoonAfterEncounterCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiedSoonAfterEncounterCohortDefinition)2 InpatientTransferCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientTransferCohortDefinition)2 InpatientLocationCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientLocationCohortDefinition)1 LastDispositionBeforeExitCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.LastDispositionBeforeExitCohortDefinition)1 EncounterCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition)1 EncounterWithCodedObsCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterWithCodedObsCohortDefinition)1