Skip to content

Commit

Permalink
added new field and facet in IVM
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Aug 6, 2024
1 parent 2632900 commit 6ded67f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void createIndexableValues(Product product, Consumer<IndexableValue> cons

// Get from Config which Substance Key Resolver to use. Substance API or Entity Mananger
if (substanceKeyResolverToUseFromConfig != null) {

if (substanceKeyResolverToUseFromConfig.equalsIgnoreCase("api")) {
// Call SUBSTANCE API Substance Resolver
createIndexableValuesBySubstanceApiResolver(consumer, substanceKey, substanceKeyType);
Expand All @@ -75,6 +76,16 @@ public void createIndexableValues(Product product, Consumer<IndexableValue> cons
} // product substance key not null
} // product Ingredient is not null
} // for productIngredients

// Number of Ingredients in the Product
if (prodLot.productIngredients != null) {
String ingredientSize = "0";
if (prodLot.productIngredients.size() > 0) {
ingredientSize = Integer.toString(prodLot.productIngredients.size());
}
consumer.accept(IndexableValue.simpleFacetStringValue("Number of Ingredients", ingredientSize));
}

} // for productLots
} // for productManufactureItems

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public class Product extends ProductCommonData {
@Column(name="PRODUCT_ID")
public Long id;

@Column(name="PHARMACEUTICAL_DOSAGE_FORM", length=500)
public String pharmaceuticalDosageForm;
@Column(name="PRODUCT_CONTAINER", length=500)
public String productContainer;

@Column(name="PHARMACEDICAL_DOSAGE_FORM", length=500)
public String pharmacedicalDosageForm;

@Indexable(suggest = true, facet=true, name="Route of Administration")
@Column(name="ROUTE_OF_ADMINISTRATION")
Expand Down

0 comments on commit 6ded67f

Please sign in to comment.