Developing Sun Master Patient Indexes

Master Index Update Policy Plug-ins

For the primary transactions performed by the master index application, you can define additional custom processing to perform against the record that results from a transaction. The policies you define are invoked by the Update Manager and are applied to the resulting records after they are processed by the survivor calculator. The modifications made to a record by an update policy determine how the record is stored in the database. By creating custom plug-ins, you can create additional Java classes to support the update policies you define.

Sun Master Patient Index provides default custom plug-ins for each update policy to generate alias names when a patient’s first, last, middle, or maiden names are modified. You can view and edit the Java code for each custom plug-in by expanding the Custom Plug-ins folder of the master index project and opening any of the Java files. Additional alias plug-ins are provided and are called by the custom update policies to process alias names after a transaction occurs.

Update policies are specified in the UpdatePolicy section of the Best Record file, and there are several different types. Each policy modifies an enterprise object (class com.stc.eindex.objects.EnterpriseObject) and must implement com.stc.eindex.update.UpdatePolicy, which contains one method, applyUpdatePolicy. The syntax is as follows:

public EnterpriseObject applyUpdatePolicy(EnterpriseObject before, EnterpriseObject after)

This method throws two exceptions: com.stc.eindex.master.UserException and com.stc.eindex.objects.exception.ObjectException.

Enterprise Merge Policy

The enterprise merge policy defines additional processing to perform after two enterprise objects are merged. The processing defined in this policy acts against the surviving record of the merge. In the EnterpriseMergePolicy element in the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default merge policy, com.stc.eindex.update.impl.EnterpriseMergePolicy, is already entered.

Enterprise Unmerge Policy

The enterprise unmerge policy defines additional processing to perform after an unmerge transaction occurs. The processing defined in this policy acts against the surviving record of the merge transaction that was unmerged. In the EnterpriseUnmergePolicy element of the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default unmerge policy, com.stc.eindex.update.impl.EnterpriseUnmergePolicy, is already entered.

Enterprise Update Policy

The enterprise update policy defines additional processing to perform after a record is updated. In the EnterpriseUpdatePolicy element of the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default update policy, com.stc.eindex.update.impl.EnterpriseUpdatePolicy, is already entered.

Enterprise Create Policy

The enterprise create policy defines additional processing to perform after a new record is inserted into the master index database. In the EnterpriseCreatePolicy element of the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default create policy, com.stc.eindex.update.impl.EnterpriseCreatePolicy, is already entered.

System Merge Policy

The system merge policy defines additional processing to perform after two system objects are merged. The processing defined in this file acts against the surviving enterprise record of the merge (and not the system record). In the SystemMergePolicy element of the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default merge policy, com.stc.eindex.update.impl.SystemMergePolicy, is already entered.

System Unmerge Policy

The system unmerge policy defines additional processing to perform after system objects are unmerged. The processing defined in this file acts against the surviving enterprise record of the system merge transaction that was unmerged. In the SystemUnmergePolicy element in the Best Record file, enter the fully qualified name of this custom plug-in. The name of the default merge policy, com.stc.eindex.update.impl.SystemUnmergePolicy, is already entered.

Undo Assumed Match Policy

The undo assumed match policy defines additional processing to perform after an assumed match transaction is reversed. In the UndoAssumeMatchPolicy element in the Best Record file, enter the fully qualified name of this custom plug-in.