Use case 6: Create a custom code set
This section illustrates the creation of a custom codeset.
To configure a custom code set, you must create or modify the rules listed in the following table.
Rule type | Name | Details |
Data Class | PegaHealth-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 Table | GetCodeSetClass | UPDATE this decision table by adding a row, to return the code set class. |
Decision Table | GetCodeSetDateFormat | UPDATE this decision table by adding a row, to return the format of the effective and expiration dates in the codes. |
Property | CodeSetType | 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 type | Rule name | Create or update | Details |
DataTransform | AddSingleCode | Create | Create 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.) |
Activity | DeleteCode | Create | Create 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.) |
Activity | SaveEditedCode | Create | Create 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 Page | D_XXXX | Create | Create a data page in code set class, which will data source as Activity named as “PrepareQueryString”. Parameters passed as Code and |
Report Definition | AllCodes | Create | 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 Transform | pySearchModel | Create | Create 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 | Create | Create 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 | Create | Create 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 | Update | Include the section “ReviewAllCodes_XXXX”, to show conditionally, when the CodeSetType |
Section | ReviewAllCodesInSearc h | Update | Include the section “ReviewAllCodes_XXXX_InSearch”, to show conditionally, when the CodeSetType is the custom code set. |
Activity | PrepareForEditableDis play | Update | Update 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.) |
List | EditList | Create | Create 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 Transform | RemoveCodeListPages | Update | Update to remove the Page that has the codes of the code set. This page was created in ‘PrepareForEditableDisplay’. |
Activity | ParseCodeSet | Update | This 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. |
Control | OpenWO | Update | Update 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