diff --git a/gsrs-module-products-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/products/product/models/ProductIngredient.java b/gsrs-module-products-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/products/product/models/ProductIngredient.java index 106f988..8f878a0 100644 --- a/gsrs-module-products-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/products/product/models/ProductIngredient.java +++ b/gsrs-module-products-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/products/product/models/ProductIngredient.java @@ -158,6 +158,15 @@ private void resolveSubstance() { SubstanceKeyPair subKeyPair = substanceApiService.convertSubstanceKeyBySubstanceKeyResolver(this.substanceKey, this.substanceKeyType); if (subKeyPair != null) { + // Basis of Strength is same as Subtance Key and Substance Key Type + if ((this.basisOfStrengthSubstanceKey != null) && this.basisOfStrengthSubstanceKey.equalsIgnoreCase(this.substanceKey)) { + if ((this.basisOfStrengthSubstanceKeyType != null) && this.basisOfStrengthSubstanceKeyType.equalsIgnoreCase(this.substanceKeyType)) { + this.basisOfStrengthSubstanceKey = subKeyPair.substanceKey; + this.basisOfStrengthSubstanceKeyType = subKeyPair.substanceKeyType; + } + } + + // Substance Key and Substance Key Type this.substanceKey = subKeyPair.substanceKey; this.substanceKeyType = subKeyPair.substanceKeyType; }