Adding a Mileage Reimbursement Plan Item

To recap, the addition of a plan item to a service plan to provide a client with Mileage Reimbursement should result in the creation of a product delivery case to pay the client the appropriate amount. However, at what point should the product delivery be created? If the product delivery is created at the same time as the plan item is added to the service plan, what should happen if the case worker inadvertently added the plan item or a supervisor rejected a request to approve the plan item? If the product delivery had been created, it would have to be closed (a product delivery cannot be deleted). This seems inappropriate. It would be preferable to defer the creation of the product delivery case until the associated plan item (or the service plan) has been approved. The approval of the plan item should therefore trigger the creation of the product delivery. However in order to create the product delivery, mileage reimbursement specific information (e.g. mileage rate and maximum monthly amount) must be captured and stored at the time the plan item is added to the service plan. The PlannedItem entity is used to store the generic plan specific information required to add a plan item to a service plan, e.g. expected start date, expected end date etc. However, it cannot be used to store the information required for a specific type of plan item, e.g. in the case of mileage reimbursement, mileage rate and maximum monthly amount. Therefore an entity must be defined to store this information. The combination of this new entity, let's call it MileageReimbursementData, and the associated PlannedItem entity contain all of the attributes required to create a Mileage Reimbursement product delivery upon approval of a Mileage Reimbursement plan item.

The two entities are linked using the PlannedItem entity's associated ID Number attribute which acts as a foreign key to the MileageReimbursementData entity. In order to populate these entities a client screen and associated server business processing must be developed. The client screen must allow the user to enter the information to be stored on PlannedItem and MileageReimbursementData; e.g., mileage rate, maximum monthly amount, expected start date, which will be later used to create the Mileage Reimbursement product delivery.

Server business processing must be implemented to insert the plan related information (e.g. expected start date, expected end date etc.) and the Mileage Reimbursement specific information into the appropriate entities. Interfaces are provided for the PlannedItem entity as part of the Cúram Service Planning framework; however custom development is required for any new entities created to store the plan item specific information, e.g. MileageReimbursementData. It is important to note at this stage an associated product delivery case has not been created. Therefore if the case worker deletes the plan item there is no associated case to close. So when does the case get created? In this example, we want the case to be created when the Mileage Reimbursement plan item is approved. A workflow event is raised when a plan item is approved at pressent. This causes a workflow process to be enacted and this workflow process can be extended to incorporate the creation of the Mileage Reimbursement prodct delivery. The workflow must be extended to include the processing required to create the appropriate product delivery. An additional transition must be added to the workflow that includes a condition based on the plan item type. If the plan item type equals that defined for a Mileage Reimbursement plan item, then the workflow will follow the path that results in the creation of a Mileage Reimbursement product delivery. To create the Mileage Reimbursement product delivery custom code must be implemented to create, approve and activate the case and finally to insert the value for the mileage rate and maximum monthly amount as case evidence. Note, case evidence must be captured before the case is approved. Once the custom code is available for these steps, the processes can then be automated by adding each process as an automatic step in the workflow. A minimum set of data is required in order to create any product delivery. The following table details the required data and the value that each item is assigned for the mileage reimbursement product delivery.

Table 1. Product Delivery Creation Data
Data Item Value
Client ID The plan participant ID. This is the participant ID of the registered client for whom the service plan has been created.
Product ID This is the ID of the mileage reimbursement product.
Product Provider ID The mileage reimbursement product is provided by the organization and therefore this can be set to the default organization provider value.
Product Provider Location ID Same as above, except this should be set to the appropriate default location.
Delivery Pattern Set to the default that has been defined for the mileage reimbursement product.
Expected Outcome (this was Objective in previous Curam versions) This should be set to the expected outcome that has been defined for the plan item. In the case of a mileage reimbursement plan item, an expected outcome is not really appropriate (other than it is expected that the client will receive mileage reimbursement payments). Therefore, the user should not be given the option to select this (though they could be) and it should be defaulted to an appropriate value.
Currency Set to the default organization currency.
Start Date Set to the value of the expected start date entered for the plan item.
Expected End Date Set to the value of the expected end date entered for the plan item.
Case Owner Set to the user selected as the plan owner.

As stated above, on approval of the plan item the associated product delivery case should not only be created, it should also be automatically approved (a supervisor has already approved the plan item and therefore by extension the associated product delivery) and activated. The mileage rate and maximum monthly payment amount should be inserted as case evidence to be used in the payment determination. On creation of the product delivery a ProductDeliveryPlanItemLink record must be written that contains the ID of the product delivery and the associated plan item. This is used to associate the product delivery with the plan item and vice versa. The MileageReimbursementData record associated with the plan item can be deleted at this point as it is no longer required.