Auto-creating reference targets

Often when batch processing data from multiple sources, you have data from one source that has references to data from other sources.

For example, a collection of Observation resources could be imported from a lab system data source at the same time that a collection of Patient resources is created from a patient administration data source. The Observation resources would have references to the Patient resources. Under ideal conditions, the Patient resource would process first and be present for the Observation to link to. In the real world however, often it is hard to control the order that transactions occur, and so it might be possible for an Observation to be processed before its Patient. By default, this causes an error since the Observation has an invalid reference, and nothing is stored.

The following topics describe helpful strategies for solving this issue: