Activities
Activities define the workload of a case manager and are managed by the Case object.
Case record types
Out of the box, there are three Case record types that capture different types of activities:
The Activity (
PJN_Activity) record type is the generic record type for any activity or ad-hoc task that requires some action by a user. This is the default record type for case managers and is what is generally referred to by the term "activity." Each activity can have more specific action items or sub-tasks to be tracked and checked off.The Missing Information (
PJN_Missing_Information) record type is created when the Missing Information stage is added and initiated. It supports the capturing of missing enrollment information, such as a patient's consent or a physician's signature.The Request (
PJN_Request) record type stores inbound items such as those submitted via email, fax, or phone. A user can initiate an Account Search on a request to associate the request with an account and subsequently create a care plan.
Each of these record types can be configured so that DocuSign consent can be generated directly from the Case record.
Record owner
Activity, Missing Information, and Request record owners do not necessarily have to be the same individuals as their parent Care Plan (Case) record owners. For instance, a mapping job can be created to map a user from a custom lookup field from the parent care plan, such as the Alternative Activity Owner (mvn__PJN_Alternative_Activity_Owner__c) field on the Case object, to the OwnerId field of the child Activity (PJN_Activity) record. However, if the mapping job tries to populate the OwnerId field with an inactive user or if the source field in the mapping is blank (null), the target OwnerId field on the Activity record will be assigned the same owner as the parent Care Plan record.
Recurring activities
Users can set activities in care plans to repeat so that when the current Activity (PJN_Activity) record is Closed or Cancelled, a new duplicate activity is created in the same stage. The fields that are copied into the new activity are controlled by the Recurring Case Clone Fields (mvn__PJN_Recurring_Case_Clone_Fields) field set. Meanwhile, the due date of the new activity is determined by the mvn__PJN_Next_Activity__c field in the original Case record, which is calculated based on the mvn__PJN_Repeat_Every__c and mvn__PJN_Cadence__c fields and can be overridden by the mvn__PJN_Override_Next_Activity__c field.
Note
The due date of a recurring activity will always be set to a weekday. For example, if the next activity's due date is supposed to land on a Sunday or Saturday, the mvn__PJN_Next_Activity__c field will set the due date to Monday instead.
Original activity's due date | Cadence | Next activity's due date |
|---|---|---|
Thursday, June 30, 2022 | 1 day | Friday, July 1, 2022 |
Thursday, June 30, 2022 | 2 days | Monday, July 4, 2022 |
Thursday, June 30, 2022 | 3 days | Monday, July 4, 2022 |

To repeat an activity:
In the highlights panel of the Activity record page, click Set Repeat. The Set Repeat modal will appear.
Set Repeat to
Repeats.Set Repeat Every to the number (of days) to when the next activity should be due and, consequently, when the subsequent activity should be created.
Set Cadence to the measurement of time for the Repeat Every value. Currently, the only available option is
Days.Click Save.
To stop an activity from repeating:
In the highlights panel of the Activity record page, click Set Repeat. The Set Repeat modal will appear.
Set Repeat to
Doesn't Repeat.Click Save.
Automatic activity creation
In addition to setting recurring activities, users can also trigger Activity (PJN_Activity) records to be automatically created upon a given event. This may be helpful in situations where users need activities to be created based on a date on a record on a parent care plan, such as when a patient's HIPAA consent is expiring in 30 days and the user must begin the renewal process with the patient.
You can configure the automation of activity creation either by adding the mvn__PJN_CarePlanActivityService action in a flow or by calling the createActivities invocable method in the Care Plan Activity Service (PJN_CarePlanActivityService) global Apex class. During the configuration process, you must set the care plan ID and the subject of the new activity in order for the activity to be successfully created. You may choose to also set the values of other fields on the new activity, including, but not limited to, the due date, the owner, and the status.
Activity action items checklist
For each Activity (PJN_Activity) record, specific action items can be further added for users to track and check off. This may be helpful for users who are assigned activities in care plan stages that encompass multiple sub-tasks, such as case managers who have to cover a number of topics in their welcome calls to patients, like checking insurance coverage, gathering communication preferences, and more. All action items are stored in the Action Item (mvn__PJN_Action_Item__c) custom object and appear in the Action Items (pjnActionItems) Lightning Web Component (LWC) on a given Case record page. However, out of the box, the Action Items LWC is only visible on Case records of the Activity (PJN_Activity) record type where there is at least one action item. Users can use the Action Items LWC as long as they have access to the activity and do not have to be the owner or assignee on the activity. The number of child action items for each Case record is tracked on the Action Items Count (mvn__PJN_Action_Items_Count__c) field on the Case object.
Action items can either be standard or custom. Standard action items can only be created, modified, and deleted by admin users directly on the Program Case Action Item (mvn__PJN_Program_Case_Action_Item__mdt) custom metadata type while custom action items can be created, modified, and deleted by users on the Action Items LWC. For both types of action items, users can directly reorder and check off (i.e., mark them as complete) in the Action Items LWC. When a user checks off an action item, the Is Complete (mvn__PJN_Is_Complete__c) field on the related Action Item record will be updated to equal true. Admin users can also enable and/or restrict users from creating and reordering action items on the Action Items LWC with the Feature Activation (mvn__Feature_Activation__mdt) custom metadata type.
Note
To create, modify, reorder, and/or delete custom action items, users must be assigned the KCC - User - Activities (PJN_User_Activities) permission set.

Create a standard action item
To create a standard action item for an activity:
(Prerequisite) Ensure that you have an existing Program Case (
mvn__PJN_Program_Case__mdt) metadata record for the activity. For more information on how to build a care program with stages and activities, reference the Programs page.Create a Program Case Action Item (
mvn__PJN_Program_Case_Action_Item__mdt) metadata record.Set the Description (
mvn__PJN_Description__c) field to the text that should appear for the action item in the Action Items LWC.Set the Program Case (
mvn__PJN_Program_Case__c) field to the Program Case metadata record from step 1.Set the Sequence (
mvn__PJN_Sequence__c) field to the order in which the action item should appear in the Action Items LWC.
When the care plan stage with the activity is started and the activity is open, the Trigger Handler Setting (mvn__PJN_Trigger_Handler_Setting__mdt) custom metadata type will call the non-global PJN_CaseActionItemHdlr Apex class to create an Action Item record according to the Program Case Action Item metadata record and set the Is Standard (mvn__PJN_Is_Standard__c) field to true.
Manage custom action items
By default, users cannot create action items. To enable users to create custom action items in the Action Items LWC:
Navigate to the Feature Activation (
mvn__Feature_Activation__mdt) custom metadata type.Open and edit the Add Action Items (
PJN_Add_Action_Items) metadata record.Check the Active (
mvn__Active__c) field (i.e., set totrue).Save your changes.
Once enabled, the Add button will appear in the Action Items LWC for users to click and create custom action items with. Afterwards, users can hover on any custom action item and click the pencil (
) icon or the trash (
) icon to edit or delete the action item, respectively. If a user edits an action item, the user must then click the check (
) icon to save their changes or click the close (
) icon to close out of the editor mode. The check icon is only enabled (i.e., clickable) if the user has modified the action item.
By default, users also cannot reorder action items. To enable users to reorder both standard and custom action items in the Action Items LWC:
Navigate to the Feature Activation (
mvn__Feature_Activation__mdt) custom metadata type.Open and edit the Reorder Action Items (
PJN_Reorder_Action_Items) metadata record.Check the Active (
mvn__Active__c) field (i.e., set totrue).Save your changes.
Once enabled, users can drag and drop any action item to a new position in the Action Items LWC.