Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Step 6: Comparing two instances (the clipboard structures) -Plan Compare

Updated on September 18, 2020

Pega Foundation for Healthcare has implemented a utility which could be utilized to compare any two instances (of their clip board structure). Demonstrated how the utility is utilized to do comparison of two plans and two benefits in the sample admin data portal.

There are three steps in this utility design.

  1. Configuring the data transforms to prepare the data modal required for compare utility and Opening the data instances.
  2. Passing the data instances (which need to be compared) and the source page (populating the data modal in point a).
  3. Populates the output on the compare results page (as a tree structure) for each property on the source page, which can be utilized for building UI as per the client needs.

Pega Foundation for Healthcare has demonstrated the usage of utility for plan comparison. The following rules can be verified for any of the implementations.

Data transforms Configured for preparing the input data modal:

SetSourcePagePegaHC-Data-Plan
SetSourcePageEmbed-PegaHC-PlanCostShare
SetSourcePageEmbed-HC-Accumulator

The configuration should follow the same structure having pyName, pyCategory, pyCaseContext, and pyNote.

  • pyName: Name of the property which need to be considered for the comparison.
  • pyCategory: Type of the property Single/Page/List (only Page list and No group properties supported).
  • pyCaseContext: Hardcoded (CompResults) path for building the Output in the same way the source structure. This value is needed only for the first level data transform (in the foundation scenario only at PegaHC-Data-Plan level Datatransform).
  • pyNote: Only Needed for Lists and only if you need similar objects to the similar context.

Properties separated by comma, which need to be considered for the bringing the similar objects to the same level.

Passing the required Params to the compareutilwrapper utility:

  • Pega Foundation for Healthcare has created “PrepareSourceDataModel” activity for preparing plan instances and sourcePage and passing them to compareWrapper.

  • CompareWrapper utility is the extension activity provided for any data manipulation and/or implementing any business logic.

  • CompareUtil has all the core logic for comparing single / Page / List properties.

    LogicDescription
    CompareWrapperExtension activity and calling compreutil activity.
    CompareUtilCore activity doing whole process of comparison.
    CompareSinglePropertiesActivity performing the comparison on single type properties.
    CompareSingleProperties_ExtnExtension provided in the single properties’ comparison.
    PageCompareActivity performing the Page type properties comparison.
    PageCompare_ExtnExtension activity.
    PrepareSortedListsActivity running the algorithm to shuffle two list properties to bring the similar objects to the same level before performing the comparison, based on the comma separated value provided in the pyNote.
    IndexToIndexCompareActivity to compare each index page two list properties.
    IndexToIndexCompare_ExtnExtension activity.
    ListToListCompareActivity to compare two List properties (not at the index level but the whole list level). This comparison can be turned on/off using “ListsComparision” parameter.
    SetContextAndSourcePageActivity used in the node of the output section to go to the next level and perform comparison, which would help going to Nth level in the clipboard structure.
    SetContext_ExtExtension activity.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us