use of org.openmrs.module.reporting.data.converter.CollectionConverter in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getAllProviders.
@DocumentedDefinition
public EncounterDataDefinition getAllProviders() {
EncounterProviderDataDefinition dd = new EncounterProviderDataDefinition();
dd.setSingleProvider(false);
ChainedConverter itemConverter = new ChainedConverter(new PropertyConverter(Provider.class, "person"), new PropertyConverter(Person.class, "personName"), new ObjectFormatter("{givenName} {familyName}"));
return new ConvertedEncounterDataDefinition(dd, new CollectionConverter(itemConverter, false, null), new ObjectFormatter(", "));
}
use of org.openmrs.module.reporting.data.converter.CollectionConverter in project openmrs-module-pihcore by PIH.
the class DataConverterLibrary method getObsValueCodedPresentConverter.
public DataConverter getObsValueCodedPresentConverter(Concept valueCoded) {
ChainedConverter converter = new ChainedConverter();
converter.addConverter(new CollectionConverter(getObsValueCodedConverter(), false, null));
converter.addConverter(new CollectionElementConverter(valueCoded, true, false));
return converter;
}
use of org.openmrs.module.reporting.data.converter.CollectionConverter 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);
}
Aggregations