Search in sources :

Example 1 with ComparableComparator

use of org.apache.commons.collections.comparators.ComparableComparator 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(Metadata.lookup(PihHaitiPatientIdentifierTypes.DOSSIER_NUMBER)));
    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)

Aggregations

ComparableComparator (org.apache.commons.collections.comparators.ComparableComparator)1 PatientIdentifier (org.openmrs.PatientIdentifier)1 CollectionConverter (org.openmrs.module.reporting.data.converter.CollectionConverter)1 PropertyConverter (org.openmrs.module.reporting.data.converter.PropertyConverter)1 ConvertedPatientDataDefinition (org.openmrs.module.reporting.data.patient.definition.ConvertedPatientDataDefinition)1 PatientIdentifierDataDefinition (org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition)1 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)1