use of org.openmrs.module.reporting.data.converter.ChainedConverter in project openmrs-module-pihcore by PIH.
the class DataConverterLibrary method getObsValueCodedConceptCode.
public DataConverter getObsValueCodedConceptCode(String conceptSourceName) {
ChainedConverter ret = new ChainedConverter();
ret.addConverter(getObsValueCodedConverter());
ret.addConverter(new ConceptCodeFromConceptConverter(conceptSourceName));
return ret;
}
use of org.openmrs.module.reporting.data.converter.ChainedConverter in project openmrs-module-pihcore by PIH.
the class DataConverterLibrary method getLastDataSetItemConverter.
public DataConverter getLastDataSetItemConverter(String columnName, Object nullReplacement) {
ChainedConverter ret = new ChainedConverter();
ret.addConverter(new ListConverter(TimeQualifier.LAST, 1, DataSetRow.class));
ret.addConverter(new DataSetRowConverter(columnName));
if (nullReplacement != null) {
ret.addConverter(new NullValueConverter(nullReplacement));
}
return ret;
}
use of org.openmrs.module.reporting.data.converter.ChainedConverter in project openmrs-module-pihcore by PIH.
the class DataConverterLibrary method getDataSetItemConverter.
public DataConverter getDataSetItemConverter(Integer index, String columnName, Object nullReplacement) {
ChainedConverter ret = new ChainedConverter();
ret.addConverter(new ListConverter(index, DataSetRow.class));
ret.addConverter(new DataSetRowConverter(columnName));
if (nullReplacement != null) {
ret.addConverter(new NullValueConverter(nullReplacement));
}
return ret;
}
use of org.openmrs.module.reporting.data.converter.ChainedConverter 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.ChainedConverter 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;
}
Aggregations