use of org.hisp.dhis.programrule.ProgramRuleVariable in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramRuleVariableWithSourceType.
public static ProgramRuleVariable createProgramRuleVariableWithSourceType(char uniqueCharacter, Program parentProgram, ProgramRuleVariableSourceType sourceType, ValueType valueType) {
ProgramRuleVariable programRuleVariable = new ProgramRuleVariable();
programRuleVariable.setAutoFields();
programRuleVariable.setName(PROGRAM_RULE_VARIABLE + uniqueCharacter);
programRuleVariable.setProgram(parentProgram);
programRuleVariable.setSourceType(sourceType);
programRuleVariable.setValueType(valueType);
return programRuleVariable;
}
use of org.hisp.dhis.programrule.ProgramRuleVariable in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramRuleVariableWithTEA.
public static ProgramRuleVariable createProgramRuleVariableWithTEA(char uniqueCharacter, Program parentProgram, TrackedEntityAttribute attribute) {
ProgramRuleVariable programRuleVariable = new ProgramRuleVariable();
programRuleVariable.setAutoFields();
programRuleVariable.setName(PROGRAM_RULE_VARIABLE + uniqueCharacter);
programRuleVariable.setProgram(parentProgram);
programRuleVariable.setAttribute(attribute);
programRuleVariable.setSourceType(ProgramRuleVariableSourceType.TEI_ATTRIBUTE);
programRuleVariable.setValueType(attribute.getValueType());
return programRuleVariable;
}
use of org.hisp.dhis.programrule.ProgramRuleVariable in project dhis2-core by dhis2.
the class DhisConvenienceTest method createProgramRuleVariable.
public static ProgramRuleVariable createProgramRuleVariable(char uniqueCharacter, Program parentProgram) {
ProgramRuleVariable programRuleVariable = new ProgramRuleVariable();
programRuleVariable.setAutoFields();
programRuleVariable.setName(PROGRAM_RULE_VARIABLE + uniqueCharacter);
programRuleVariable.setProgram(parentProgram);
programRuleVariable.setSourceType(ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT);
programRuleVariable.setValueType(ValueType.TEXT);
return programRuleVariable;
}
use of org.hisp.dhis.programrule.ProgramRuleVariable in project dhis2-core by dhis2.
the class DhisConvenienceTest method createConstantProgramRuleVariable.
public static ProgramRuleVariable createConstantProgramRuleVariable(char uniqueCharacter, Program parentProgram) {
ProgramRuleVariable programRuleVariable = new ProgramRuleVariable();
programRuleVariable.setAutoFields();
programRuleVariable.setName(uniqueCharacter + "1234567890");
programRuleVariable.setProgram(parentProgram);
programRuleVariable.setSourceType(ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT);
return programRuleVariable;
}
Aggregations