Household entity
Pega Government Platform provides data support to collect data about households in the form of Household Entity.
The Household Entity feature contains a persistent datastore and three supporting case types to manage the Household Entity datastore.
Add Household case type
Add a household case type to the system. Using the PegaPS-Work-Entity-Household-Add case type, you can introduce a new entity of the type Household into the system.
Adding a new household is a three step process. In the Household information step, the basic details like name, type of household, name, description, and start date are captured. In the next step, address details are captured and in the last step details of the household members are captured, and then all the details are persisted.
Adding a new field to the household intake screen
Capture a new field in the household intake screen and persist it. You can add a new data field or property and extend the existing household intake screen.
- Create a field, for example, Is Remote location in the household data type.
- Run the Household case type and navigate to the Capture household information view.
- Click the Add icon and add the field created in step
1.
Adding a new list item
Update an existing list of items with new items.
- In Dev Studio, to add a new list item, create a data type HouseholdItems in the PegaDATA database and have the following properties pyID (Primary key), EntityID, and EntityType.
- Add other properties related to subsidiary like item name, cost, purchased on, and so on.
- In the Vehicle data type (PegaPS-Data-Entity-Household),
create a field.
- In the Field name box, enter HouseholdItemsList.
- In the Type list, select Embedded data.
- In the Data object list, select HouseholdItem.
- Click Submit.
- Update the PersitEmbeddedPage (PegaPS-Data-Entity-Household) activity with a new step looping the HouseholdItemsList property and invoke the activity SaveObject by passing the EntityID and EntityType parameters similar to AddressList.
- Create a UI to capture the household item details so that they persist after you enter the data.
Update Household case type
Update the existing household case type. Using the PegaPS-Work-Entity-Household-Update case type, you can update the details of an existing entity.
The Update household case type fetches the details of the Household entity that needs to be updated. You can make changes to the household data and submit them. The details persist after you submit.
The D_Household data page fetches the entity details along with associated data, like Address.
Updating an existing list property
Update the existing list properties for the household entity.
Fetch the household details to update the list of item details in a household that are captured as a part of Add Household. Update an existing list property, for example, HouseholdItemsList.
- Update the FetchHouseholdDetails (PegaPS-Data-Entity-Household) data transform.
- Add a step similar to AddressList.
Update Manage members case type
Update the existing members of a household case type. Using the PegaPS-Work-Manage-Member case type, you can update the details of the existing members of a household.
When you try to update existing members of a household by adding a new member or by updating the details of an existing member, the current household becomes inactive and a new household gets created with active status with the updated list of members.
View Household case type
View the details of a household entity. Using the PegaPS-Work-Entity-Household-View temporary case type, you can view the complete details of an existing household entity.
The Details (PegaPS-Data-Entity-Household) wrapper section contains all the household related views or sections.
Adding a field to the household view
Add new fields to an existing household view.
- To add the field, navigate to the Details wrapper section to show the field, or navigate to the Case details section.
- Add the new field along with the existing ones.
Showing captured list details in the household view
Show the captured list, for example, HouseholdItemsList details in the household view.
- Create a view or section in the PegaPS-Work-Entity-Household-View class.
- Include the section in the Main content region of the
pyCaseMainInner view as a tab.
Previous topic Vehicle entity Next topic Facility entity