Extending the document generation feature

From PegaWiki
Extending the document generation feature in PCS / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Extending the document generation feature

Description Leveraging document generation feature in PCS
Version as of 8.7
Application Pega Product Composer for Healthcare
Capability/Industry Area Healthcare and Life Sciences


The PCS application provides a robust infrastructure for supporting the configuration of additional standardized documents beyond the Summary of Benefits and Coverage (SBCs). The goal of this article is to explain the configuration steps for the IT team to follow when the implementation team wants to use PCS for generating these additional documents as part of the plan configuration. Following the design pattern established by SBC's and using the built-in support for managing document templates along with PDF generation capabilities, the implementation team can leverage PCS for their document generation needs.

Once the templates and flows are configured, the business team can use PCS to generate the necessary compliance data using the latest values from the plan in PCS. Using the plan data directly for generating all compliance documents results in reduced errors, better tracking and unified operational flow, thereby expediting the generation of compliance documents. While we’ll refer primarily to plans throughout the article, the document generation feature also applies to products (although the affected rules will be different).

Roles and responsibilities

It is important to note that the creation of these rules is a one-time setup activity which would be taken up by the IT team. After that, the business owners can use the application to create multiple document templates (different versions) of the documents. The business owners can also use the application to the associate these templates to the respective plans. Following is the terminology we'll use to differentiate the different components of the document generation process along with expected ownership.

  • “Document type” – This is a distinct document that the client needs to generate (SBC, ANOC, Benefit Highlight Sheet, etc. are all document types).  OOTB, PCS only supports the SBC document type.  Support for new document types must be added by experienced Pega developers based on the design pattern laid out by SBC’s. This is a one-time effort.
  • “Document base template” – It is recommended that a basic sample template be created for each new document type.  This would generally be created by developers and business analysts and could later be copied by business users when creating new templates. This is a one-time effort.
  • “Document template” – Using the infrastructure created for a new document type, business users can then create an unlimited number of versions (or templates) of that document type.  For example, you may create unique templates for a given document type for different clients or lines of business.  Copying an existing template gives the user a head start.
Document Component Description of task Frequency Owner Tools used
1 Document Type Addition of new document to document management portal for template editing, updating the plan flow and pdf generation rules. One-time IT team Dev Studio
2 Document Base Template Create sample template for new document type to be used as a guide by business users when creating a new template. One-time IT team Dev Studio
3 Document Template Creation of new versions of document templates, updates to the doc template, copying the doc templates, ongoing maintenance Ongoing Business team PCS Application
4 Document Template Associating the document template with plans Ongoing Business team PCS Application

Use case examples

For example, the implementation team may want to generate a Summary of Benefits document or benefit highlights sheet from the PCS application. Here the goal of the business is to have these documents generated (and updated) as part of the plan configuration process itself. The documents should be generated in a PDF format and attached to the plans being configured. These are just a couple of examples, but the implementation teams can bring on any standardized document using the built-in support for document generation.

Before you begin

You can get a good understanding of the SBC generation process by reviewing this article: https://wiki.pega.com/index.php/Implementing_the_SBC_Feature There are three main steps involved in adding support for a new compliance document type (like benefit highlights, ANOC, etc) in PCS.

  1. Creating/modifying rules to support the template editing process for the new document type, and creation of a sample (base) document template
  2. Creating/modifying rules to allow the association of the new template to a plan and to populate it with plan-specific data
  3. Creating/modifying rules to generate the PDF and attach it to the plan

Each of these steps do require strong technical Pega skills and would involve updating and creating rules as per the design of the compliance document that we need to bring onboard. In the sections below, each of these steps is explained in detail, along with the list of rules to be modified.

Process/Steps to achieve objective

Out of the box, there is a dedicated portal called "Document Management" for managing all document templates in PCS. That portal should be our starting point for bringing any new document type into PCS. The picture below shows the dashboard for the Document Management portal, and currently you can see two different document types - SBC and Benefit highlights. (As a reminder, only the SBC document type is supported in PCS out-of-the-box. The Benefit highlights sheet is used as an example only.) We will walk through the process of adding the "Benefit highlights" document into the PCS application and describe in detail all the steps that the implementation team must follow. Each new document type that is added will show as another tab on the dashboard.

Doc Management portal

Create base document template

The first step involves creating a static template for the new type of document that we want to bring onboard. This means that we would leave the placeholders for any values that do get populated from the plan. Those values would be populated into the document at a later step. We also need to divide the document into functional areas, so that the document is easy to fill in and map for the end user. Refer to the benefit highlights sheet document below.

Sample highlights sheet

As you can see here, the document has many functional areas. While bringing the template onto PCS, we have decided to organize the document into the following tabs:

  1. Overall payments
  2. Benefits
  3. Signature
Highlights sheet template wiki.jpg

There is no change in functionality; this is simply to organize the data and make it easier for the user to make the necessary configurations. The list of rules to create/modify to build this new template are listed below. As seen in the comments, we've used the out-of-the-box rules for SBC's as a starting point and accelerator for this process. In some cases we modified existing rules to add changes required for the new document type, while in others, we copied existing rules used for SBC generation and modified them for the new benefits highlight document type.

Each rule has its class name and the description of the change included. Our goal here is to create very small atomic sections representing each portion of static text on the page, and then arrange all of them in the respective harness. The best way to approach this would be to start small. Create a small static section, create all the necessary rules to make that functional, and gradually keep adding the remainder of the sections. The whole process appears complex, but is actually supported by simple sections, data transforms, data pages and some activities underneath.

Along the same lines, create the necessary rules for the next two tabs and ensure that you are able create, edit and delete a document template from the portal.

Populate template with plan (and product) data

Once the new document type/base template are created, our next task would be to create the logic to dynamically populate the placeholders in the template using the actual plan (or product) data. Since these document templates can be populated with plan or product data, the corresponding rules for both plan and product flows need to be modified. The list of rules to be created/modified for this step are listed below.

Once these rules are created, you will see the default options when configuring the product and plan.

Generate and attach PDF

The final task is to create/modify the rules below that are used to generate the new document type as a PDF and attach it to the plan (or product).

Additional Details

For more specific details and instructions on the document creation process described in this article, please refer to the following feature video recording: https://bcove.video/3mcROwG