Search in sources :

Example 1 with EncountersForPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition in project openmrs-module-pihcore by PIH.

the class PihPatientDataLibrary method getRegistrationEncounter.

private PatientDataDefinition getRegistrationEncounter(DataConverter... converters) {
    EncountersForPatientDataDefinition registrationEncounters = new EncountersForPatientDataDefinition();
    registrationEncounters.setTypes(Arrays.asList(Metadata.lookupEncounterType(PihEmrConfigConstants.ENCOUNTERTYPE_PATIENT_REGISTRATION_UUID)));
    return new ConvertedPatientDataDefinition(registrationEncounters, converters(new EarliestCreatedConverter(Encounter.class), converters));
}
Also used : EncountersForPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition) EarliestCreatedConverter(org.openmrs.module.reporting.data.converter.EarliestCreatedConverter) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)

Example 2 with EncountersForPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition in project openmrs-module-pihcore by PIH.

the class PihPatientDataLibrary method getLastEncounter.

private PatientDataDefinition getLastEncounter(DataConverter... converters) {
    EncountersForPatientDataDefinition visitEncounters = new EncountersForPatientDataDefinition();
    visitEncounters.setOnlyInActiveVisit(true);
    visitEncounters.setWhich(TimeQualifier.LAST);
    return new ConvertedPatientDataDefinition(visitEncounters, converters);
}
Also used : EncountersForPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)

Example 3 with EncountersForPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition in project openmrs-module-pihcore by PIH.

the class PihPatientDataLibrary method getCheckinEncounter.

private PatientDataDefinition getCheckinEncounter(DataConverter... converters) {
    EncountersForPatientDataDefinition checkinEncounters = new EncountersForPatientDataDefinition();
    checkinEncounters.setTypes(Arrays.asList(Metadata.lookupEncounterType(PihEmrConfigConstants.ENCOUNTERTYPE_CHECK_IN_UUID)));
    checkinEncounters.setOnlyInActiveVisit(true);
    checkinEncounters.setWhich(TimeQualifier.FIRST);
    return new ConvertedPatientDataDefinition(checkinEncounters, converters);
}
Also used : EncountersForPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)

Example 4 with EncountersForPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition in project openmrs-module-pihcore by PIH.

the class PihPatientDataLibrary method getAdmissionEncounter.

private PatientDataDefinition getAdmissionEncounter(DataConverter... converters) {
    EncountersForPatientDataDefinition admissionEncounters = new EncountersForPatientDataDefinition();
    admissionEncounters.setTypes(Arrays.asList(Metadata.lookupEncounterType(PihEmrConfigConstants.ENCOUNTERTYPE_ADMISSION_UUID)));
    admissionEncounters.setOnlyInActiveVisit(true);
    admissionEncounters.setWhich(TimeQualifier.FIRST);
    return new ConvertedPatientDataDefinition(admissionEncounters, converters);
}
Also used : EncountersForPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)

Example 5 with EncountersForPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition in project openmrs-module-pihcore by PIH.

the class PihPatientDataLibrary method getAdmissionOrTransferEncounter.

private PatientDataDefinition getAdmissionOrTransferEncounter(DataConverter... converters) {
    EncountersForPatientDataDefinition adtEncounters = new EncountersForPatientDataDefinition();
    adtEncounters.setTypes(Arrays.asList(Metadata.lookupEncounterType(PihEmrConfigConstants.ENCOUNTERTYPE_ADMISSION_UUID), Metadata.lookupEncounterType(PihEmrConfigConstants.ENCOUNTERTYPE_TRANSFER_UUID)));
    adtEncounters.setOnlyInActiveVisit(true);
    adtEncounters.setWhich(TimeQualifier.LAST);
    return new ConvertedPatientDataDefinition(adtEncounters, converters);
}
Also used : EncountersForPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)

Aggregations

ConvertedPatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)5 EncountersForPatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition)5 EarliestCreatedConverter (org.openmrs.module.reporting.data.converter.EarliestCreatedConverter)1