Events
Events represent important milestones in a patient’s care plan and are managed by the Event (mvn__PJN_Event__c
) custom object.
Event creation
Events can be created in several ways:
Manually by users. For example, recording therapy access when updating a coverage investigation in the
PJNCoverageInvestigationUpdateQuickAction
Lightning Component creates an Event record ofPJN_Therapy_Access
record type. All other manual event creations are ofPJN_Therapy_Status_Update
record type.Automatically when records related to the care plan are updated. For example, updating the
mvn__PJN_Physician__c
field on the Care Plan (Case
) record creates an Event record ofPJN_Physician_Change
record type via thePJN_EventCreation
Apex class.Via third-party vendors. For example, receiving a pharmacy status update via an integration creates an Event record of
PJN_Pharmacy_Status_Update
record type.
Event rollup
Events such as therapy status updates and pharmacy status updates can be rolled up to their parent care plans via the Event Rollup (mvn__PJN_Event_Rollup__mdt
) and Event Rollup Mapping (mvn__PJN_Event_Rollup_Mapping__mdt
) custom metadata types. Once configured, the PJN_After_Insert_Event
Trigger Handler Setting (mvn__PJN_Trigger_Handler_Setting__mdt
) metadata record will subsequently call the PJN_EventHdlr
class to roll up the values from the defined Event record types to the parent Case records.
Note
The last record inserted of each defined Event record type is what gets mapped to the parent Case record.
To configure an event rollup for a specific Event record type:
Create an Event Rollup (
mvn__PJN_Event_Rollup__mdt
) metadata record.Create an Event Rollup Mapping (
mvn__PJN_Event_Rollup_Mapping__mdt
) metadata record and relate it to the Event Rollup metadata record created in step 1.
Example: Therapy status update
The following metadata records are an example of how therapy status update events can be configured to roll up to their parent care plans.
Field label | Sample value |
---|---|
Event Record Type |
|
Field label | Sample value |
---|---|
Event Rollup | The Event Rollup ( |
Source Event Field |
|
Target Case Field |
|
Example: Pharmacy status update
The following metadata records are an example of how pharmacy status update events can be configured to roll up to their parent care plans.
Field label | Sample value |
---|---|
Event Record Type |
|
Field label | Sample value |
---|---|
Event Rollup | The Event Rollup ( |
Source Event Field |
|
Target Case Field |
|