use of org.hisp.dhis.program.ProgramStageDataElement in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramStageDataElement.
public static ProgramStageDataElement createProgramStageDataElement(ProgramStage programStage, DataElement dataElement, Integer sortOrder, boolean compulsory) {
ProgramStageDataElement psde = new ProgramStageDataElement(programStage, dataElement, compulsory, sortOrder);
psde.setAutoFields();
return psde;
}
use of org.hisp.dhis.program.ProgramStageDataElement in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramStageDataElement.
public static ProgramStageDataElement createProgramStageDataElement(ProgramStage programStage, DataElement dataElement, Integer sortOrder) {
ProgramStageDataElement psde = new ProgramStageDataElement(programStage, dataElement, false, sortOrder);
psde.setAutoFields();
return psde;
}
use of org.hisp.dhis.program.ProgramStageDataElement in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramStage.
public static ProgramStage createProgramStage(char uniqueCharacter, Set<DataElement> dataElements) {
ProgramStage programStage = createProgramStage(uniqueCharacter, 0);
if (dataElements != null) {
int sortOrder = 1;
for (DataElement dataElement : dataElements) {
ProgramStageDataElement psd = createProgramStageDataElement(programStage, dataElement, sortOrder);
psd.setAutoFields();
programStage.getProgramStageDataElements().add(psd);
}
}
return programStage;
}
Aggregations