Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Balcan authored and andresmr committed Nov 13, 2024
1 parent 7d080b2 commit 9073535
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,33 +411,6 @@ fun ProgramRuleVariable.toRuleVariable(
}
}

fun getOptions(
useCodeForOptionSet: Boolean,
dataElementUid: String?,
trackedEntityAttributeUid: String?,
attributeRepository: TrackedEntityAttributeCollectionRepository,
dataElementRepository: DataElementCollectionRepository,
optionRepository: OptionCollectionRepository,
): List<Option> {
if (useCodeForOptionSet) {
return emptyList()
}

return if (dataElementUid != null) {
dataElementRepository.uid(dataElementUid).blockingGet()?.optionSet()?.uid()
?.let { optionSetUid ->
optionRepository.byOptionSetUid().eq(optionSetUid).blockingGet()
}?.map { option -> Option(option.name()!!, option.code() ?: "") } ?: emptyList()
} else if (trackedEntityAttributeUid != null) {
attributeRepository.uid(trackedEntityAttributeUid).blockingGet()?.optionSet()?.uid()
?.let { optionSetUid ->
optionRepository.byOptionSetUid().eq(optionSetUid).blockingGet()
}?.map { option -> Option(option.name()!!, option.code() ?: "") } ?: emptyList()
} else {
emptyList()
}
}

fun ValueType.toRuleValueType(): RuleValueType {
return when {
isInteger || isNumeric -> RuleValueType.NUMERIC
Expand Down

0 comments on commit 9073535

Please sign in to comment.