Skip to main content


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

Use case 6: Create a custom code set

Updated on April 23, 2021

This section illustrates the creation of a custom codeset.

Pega Foundation for Healthcare

To configure a custom code set, you must create or modify the rules listed in the following table.

Rule typeNameDetails
Data ClassPegaHealth-Codes-Data-XXXX

Create a data class that extends the abstract class “PegaHealth-Codes-Data-”. Create the necessary

properties.

DB Table<database table name>Create a table in the database.
Database Table mapping<Pega Platform database mapping rule>Map the data class to the DB table using an instance of “Data-Admin-DB-Table”.
Parse Delimited

Name space:ParseCode

Record Type:ParseCode

Create parse delimited rule, in lines with the format of the incoming data in the code set file.
Decision TableGetCodeSetClassUPDATE this decision table by adding a row, to return the code set class.
Decision TableGetCodeSetDateFormat

UPDATE this decision table by adding a row, to return the format of the effective and expiration

dates in the codes.

PropertyCodeSetType

UPDATE this property, present in the code set work type “PegaHealth-Work-CodeSet”, to have the

appropriate value and label for

The following rules are optional and are for configuring additional features such as add a single code, delete a code, and Save edited code. Modify these rules for your custom code set depending on the functionality that you want.

Rule typeRule nameCreate or updateDetails
DataTransformAddSingleCodeCreateCreate this DataTransform in the code set data class, which sets the properties of the new code. (Refer to the DataTransform, with the same name, in other code set classes.)
ActivityDeleteCodeCreateCreate this activity in the code set data class, to delete a single code. (Refer to the activities, with the same name, in other code set classes.)
ActivitySaveEditedCodeCreateCreate this activity in the code set data class, to update an existing code. (Refer to the activities, with the same name, in other code set classes.)
Data PageD_XXXXCreate

Create a data page in code set class, which will data source as Activity named as “PrepareQueryString”.

Parameters passed as Code and

Report DefinitionAllCodesCreate

Create a Report Definition in the Code set class, to fetch the codes from the DB. (Refer to the Report definition, with the same name, in other code set

classes.)

Data TransformpySearchModelCreateCreate a data transform to set all properties to “” which all needs to be fetched through report definition and display on listing.
Section

ReviewAllCodes_X

XXX_I nSearch

CreateCreate a section with repeat Grid layout to show the codes fetched using the source as data page created in above step as “D_XXXX”.
Section

ReviewAllCodes_X

XXX

CreateCreate a section with repeat Grid layout to show the codes fetched using the source as data page created in above step as “D_XXXX”.
SectionReviewAllCodesUpdateInclude the section “ReviewAllCodes_XXXX”, to show conditionally, when the CodeSetType
Section

ReviewAllCodesInSearc h

UpdateInclude the section “ReviewAllCodes_XXXX_InSearch”, to show conditionally, when the CodeSetType is the custom code set.
ActivityPrepareForEditableDis playUpdateUpdate this activity to create a page, which is used to show the parsed codes. (Refer the other steps, which are created for other code sets.)
ListEditListCreateCreate a list rule, with the properties of the code set. This rule will be used during ‘Edit in excel’. (Refer to List rules, with the same name)
Data TransformRemoveCodeListPagesUpdateUpdate to remove the Page that has the codes of the code set. This page was created in ‘PrepareForEditableDisplay’.
ActivityParseCodeSetUpdateThis is the main activity that handles the parsing. If the custom code has any other dates, apart from effective and expiration dates, edit the java step (with label ‘Format the Dates’) in step 9.
ControlOpenWOUpdateUpdate this control, which displays the label for the code set.

For additional details, see Managing new code sets in foundation application guide on the Pega Foundation for Healthcare application.

The Application guide can be referenced from Records > Application Guide > Managing new code sets in foundation.

  • Previous topic Use case 5: Accessing audit trail, attachments, and notes
  • Next topic Use case 7: Navigating the Medical Dictionary for Regulatory Activities (MedDRA) code set

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