Search in sources :

Example 1 with ProgramStageDataElement

use of org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStageDataElement in project dhis2-core by dhis2.

the class ModelMapping method getDataElementLWUIT.

public static ProgramStageDataElement getDataElementLWUIT(org.hisp.dhis.dataelement.DataElement dataElement) {
    ProgramStageDataElement de = new ProgramStageDataElement();
    de.setId(dataElement.getId());
    de.setName(dataElement.getFormNameFallback());
    de.setType(dataElement.getValueType());
    de.setCategoryOptionCombos(getCategoryOptionCombos(dataElement));
    // Limit the optionset transfer to the client
    if (dataElement.getOptionSet() != null && dataElement.getOptionSet().getOptions().size() <= 50) {
        de.setOptionSet(getOptionSet(dataElement));
    }
    return de;
}
Also used : ProgramStageDataElement(org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStageDataElement)

Aggregations

ProgramStageDataElement (org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStageDataElement)1