Product management examples

Each product type must include its own product manager that is bound against its code table type.

The concept of a product manager was introduced in the IBM® Cúram Social Program Management solution for HCR. Use the product manager to create products, modify products, and update case groups. Each product type must include its own product manager so that the different ways that products are created and modified can be managed. For example, for the Streamlined Medicaid implementation, all eligible members must be added to the same product. In contrast, for the Insurance Assistance implementation, a product must be created for each eligible unit.

Example 1

This example shows the HealthCareProductManager interface that the new product implements.

/**
          * HealthCareProductManager interface to be implemented per HCR product type.
          */   
        @AccessLevel(AccessLevelType.EXTERNAL)
        @Implementable   
        public interface HealthCareProductManager {

          /**
           * Responsible for the creation and modification (such as adding a new participant)
           * of a product based on the <code>programDetails</code> passed.
           *
           * <p/>
           * This method should return details of any new products created using
           * {@link ProcessedProgramDetails #getNewPDCaseList()}.
           *
           * <p/>
           * This method should return details of any change to existing product
           * certification period in
           * {@link ProcessedProgramDetails #getPdCaseIDToAdjustedCertPeriod()}.
           *
           * @param programDetails {@link ProgramDetails}
           * @return {@link ProcessedProgramDetails}
           *
           * @throws AppException
           * @throws InformationalException
           */
          ProcessedProgramDetails manageProgram(final ProgramDetails programDetails)
             throws AppException, InformationalException;

          /**
           * Responsible for maintaining <code>casegroups</code> for this product type.
           *
           * <p/>
           * Store the <code>casegroups</code> details for this product from the latest
           * determination read with the {@link CaseGroupsDetails #getCaseKey()}
           * provided.
           *
           * @param caseGroupDetails {@link CaseGroupsDetails}
           * @throws AppException
           * @throws InformationalException
           */
          void manageCaseGroup(CaseGroupsDetails caseGroupDetails)
            throws AppException, InformationalException;
        }

Example 2

This example shows how to bind the implementation against its product type.

final MapBinder<String, HealthCareProductManager> healthCareManagerMapbinder =
               MapBinder.newMapBinder(binder(), String.class,
                 HealthCareProductManager.class);

         healthCareManagerMapbinder.addBinding(PRODUCTTYPE.STATEBENEFIT)
            .to(StateBenefitProductManager.class);