Search in sources :

Example 6 with ConvertedPatientDataDefinition

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

the class PihPatientDataLibrary method getAllDossierNumberIdentifiers.

@DocumentedDefinition("allDossierNumbers.identifier")
public PatientDataDefinition getAllDossierNumberIdentifiers() {
    PatientIdentifierDataDefinition pdd = new PatientIdentifierDataDefinition();
    pdd.setTypes(Arrays.asList(getDossierNumberType()));
    CollectionConverter cc = new CollectionConverter(new PropertyConverter(PatientIdentifier.class, "identifier"), false, new ComparableComparator());
    return new ConvertedPatientDataDefinition(pdd, cc);
}
Also used : PatientIdentifierDataDefinition(org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition) PropertyConverter(org.openmrs.module.reporting.data.converter.PropertyConverter) ComparableComparator(org.apache.commons.collections.comparators.ComparableComparator) CollectionConverter(org.openmrs.module.reporting.data.converter.CollectionConverter) PatientIdentifier(org.openmrs.PatientIdentifier) ConvertedPatientDataDefinition(org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 7 with ConvertedPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition 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 8 with ConvertedPatientDataDefinition

use of org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition 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)8 EncountersForPatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition)6 PatientIdentifierDataDefinition (org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition)2 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)2 ComparableComparator (org.apache.commons.collections.comparators.ComparableComparator)1 PatientIdentifier (org.openmrs.PatientIdentifier)1 MappedData (org.openmrs.module.reporting.data.MappedData)1 AgeConverter (org.openmrs.module.reporting.data.converter.AgeConverter)1 CollectionConverter (org.openmrs.module.reporting.data.converter.CollectionConverter)1 EarliestCreatedConverter (org.openmrs.module.reporting.data.converter.EarliestCreatedConverter)1 PropertyConverter (org.openmrs.module.reporting.data.converter.PropertyConverter)1 PatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition)1 PersonToPatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.PersonToPatientDataDefinition)1 AgeAtDateOfOtherDataDefinition (org.openmrs.module.reporting.data.person.definition.AgeAtDateOfOtherDataDefinition)1