Implementing and using product and plan flattening feature
Implementing and using product and plan flattening feature
Product and plan flattening
Pega Product Composer for Healthcare (PCS) is a healthcare application that is built on Pega Foundation for Healthcare. One of the powerful features in PCS is data reuse based on a structured inheritance model. This requires that product and plan data are stored in a nested fashion with many layers of inheritance potentially defining coverage information. Only incremental changes for coverage information are stored at each layer in the products and plans. Obtaining a complete view of the cost shares that are associated with a plan requires complex navigation of this data structure in the clipboard. As is consistent with any Pega application, all data is XML and Pega blob-based.
To assist with this, PCS has a feature which reformats (or flattens) the product and plan data objects into a data model which is much more traversable. Using this feature is one of the recommended ways to extract product and plan data from the application.
Before you begin
The following articles cover the actual process of flattening and how to automate it using configuration controls:
Behind the scenes, the new Auto flattening job work object is created whenever there is a request for flattening. There is a dedicated queue assigned on a separate node, which handles the actual flattening jobs.This ensures that running the flattening process does not impact the performance of the application.The Pending Auto Flatten Entities dedicated workbasket, ensures complete transparency into the status of each flattening job. Each job might contain multiple products and plans. You can see the exact details at all times.
The data model for the flattened data structures (FDS) is updated any time the corresponding data models for the primary data entities in PCS are updated. By using the built-in extension points, you can add more custom properties to the FDS and flattening process which ensures that all relevant properties that are specific to the implementation layer are also available as part of the flattening extract.
FAQs for flattening
- Product and plan flattening utilities at disposal in product composer system and are their purposes:
Activity/Utility | Class | Parameters | Purpose |
CreateFlattenedStructure | PegaHC-Data- | ContractID
(Ex: PLAN-1443) |
This acts as the starting point to flatten a single plan and it takes Plan ContractID property as input. |
CreateFlattenedStructureProductWrapper | Rule-HC-PCS-Product | ProductName
(Ex: PRD-3078-1557655690627) |
This acts as the start point to flatten a single Product and it takes Product Name (ex: PRD-3078-1557655690627) property as input. |
FlattenAllProducts | @baseclass | RunTime
(Date time) |
Used for Product flattening in bulk. This will delete all the existing flattened records before flattening. |
PcsFlattenedProductWrapper | PegaHC-Data- | ProductBaseName
(Ex: PRD-3078-1557655690627, PRD-3079-1557655690627) OR Ex: PRD-3078-1557655690627 |
Used for Product flattening in bulk. It takes a single ProductBaseName or a list of Products ProductBaseName separated by comma as input. Flattens all the given products. |
PCSFlattenedPlanWrapper | PegaHC-Data- | ContractID
(Ex: PLAN-1443,PLAN-1444) OR Ex: PLAN-1443 |
Used for Plan flattening in bulk. It takes a single ContractID or a list of Plan ContractIDs separated by comma as input. Flattens all the given plans. |
PCSFlattenAllPlansAfterDeleting | PegaHC-Data- | No paramaters | Flatten all the plans in the system. This was added in PCS 8.1, HFix-56291 |
DeleteFlatteningDataOfProduct | Rule-HC-PCS-Product | ProductID
(Ex: PRD-3078-1557655690627) |
This will delete all the existing flattening records instances for a given Product. |
DeleteFlatteningDataOfPlan | PegaPCS-Data-Plan | ContractID
(Ex: PLAN-1443) |
This will delete all the existing flattening records instances for a given Plan contract ID. |
DeleteAndReflattenPlan | PegaPCS-Data-Plan | ContractID
(Ex: PLAN-1443) |
This acts as the starting point to flatten a single plan and it takes Plan ContractID property as input. This will delete the existing flattened record of the given Plan before flattening. It reattempts to flatten the plan (which has failed) number of times given in DSS FlatteningRequeueMaxAttempt. |
DeleteAndReflattenProduct | Rule-HC-PCS-Product | ProductName
(Ex: PRD-3078-1557655690627) |
This acts as the starting point to flatten a single Product and it takes Product name property as input. This will delete the existing flattened record of the given Product before flattening |
2. What are the queue processors that perform flattening?
- Product flattening: CreateFlattenedProduct
- Plan flattening: CreateFlattenedPlan
Please find the documentation on Queue processors rule type at the below link
https://docs.pega.com/system-administration/87/queue-processor-faq#section_gv2_xkd_s4b
3.What steps should be followed if an email is received with flattening count mismatch?
Please investigate in the PegaRULES logs of the nodes with node classification “Background Processing” for any unanticipated exceptions.
4.What are the scenarios when no email on flattening failure/record count mismatch is received even when the flattening for a particular or a batch of product or plan has failed?
- A runtime exception occurred while running the flattening utility.
- This occurrence can be detected by reviewing PegaRULES logs of the Pega instances running in the util/background processing nodes. Alternatively, reviewing the web or application server logs of the nodes running the background processes. For Customer cloud or PegaCloud customers the respective cloud admin needs to be contacted for obtaining the logs.
The background processing node that runs the current flattening job goes down due to an unanticipated reason.
- This occurrence can be detected by contacting the web or application server administration team for on premise customers and cloud administration team for cloud customers.
https://docs.pega.com/system-administration/85/understanding-logs-and-logging-messages
5.If flattening is found to be failed for a particular entity or a batch of entities, how to debug?
Look for exceptions that may have occurred. The broken queue items present in the below mentioned QPs can be helpful:
- Product flattening: CreateFlattenedProduct
- Plan flattening: CreateFlattenedPlan
https://docs.pega.com/system-administration/85/understanding-logs-and-logging-messages
The broken queue items can be re-queued depending on the nature of the exception that caused the flattening failure.
Use case examples
FDS is the recommended source for all integration and data extraction from PCS. The following describes some use cases:
Claims Adjudication
For high-performing claims adjudication systems which rely on the product repository as the source of truth for benefit determination, the ability to get to the right benefit and associated cost shares in a timely manner is critical. By using FDS, you avoid time-consuming navigation of the inheritance tree. For such business scenarios, FDS is an out-of-the-box PCS feature which takes a product or plan and transforms them into multiple data instances which have all the benefit and cost share data that are associated with the plan. FDS contains all the information to determine the benefit, all cost share data, all limit data, and pricing information. Allowing for decoupling in enterprise architecture, the FDS data model is part of Pega Foundation for Healthcare and thus can be used for claims adjudication by Pega Smart Claims Engine or any claims processing system.
API based integration
All PCS APIs use FDS as the source for integration with other Pega Healthcare products – Pega Customer Service for Healthcare, Pega Smart Claims Engine, and Pega Sales Automation for Healthcare.
Incremental product and plan updates
By selectively parsing through the regenerated XML files (compare old and new plan XML), you can derive the changes made to the products and plans. This has many use cases, such as publishing only the changes for approval or regulatory compliance.
Summary
You now have the detailed walkthrough of the flattening process, the configuration options to automate it, and the possible use cases for leveraging the flattened data. This helps you to successfully integrate PCS into your existing enterprise architecture.