Step 7: Managing custom code sets
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 custom code set. |
The following rules are optional and are used 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 desired functionality.
Rule type | Rule name | Create or update | Details |
Activity | AddSingleCode | Create | Create this activity in the code set data class, which sets the properties of the new code. (Refer to the activities, 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 CodeSetType. |
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). |
Custom Search Properties | pySearch | Create | Create a Custom Search properties rule to add all properties to which all needs to be fetch through report definition and display on listing. |
Section | ReviewAllCodes_XXXX_InSearch | 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_XXXX | 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 is the custom code set. |
Section | ReviewAllCodesInSearch | Update | Include the section ‘ReviewAllCodes_XXXX_I nSearch’, to show conditionally, when the CodeSetType is the custom code set. |
Activity | PrepareForEditableDisplay | 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, in other code set classes) |
Data Transform | RemoveCodeListPages | Update | Update to remove the Page that has the codes of the code set. This page was created in ‘PrepareForEditableDispl ay’ and ‘OpenDefaults activities. |
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 this activity. |
Control | OpenWO | Update | Update the this control, which displays the label for the code set. |
Previous topic Step 6: Comparing two instances (the clipboard structures)- Plan Compare Next topic Step 8: Managing code groups