Auto-create placeholder reference targets with identifier

If the Auto-Create Placeholder Reference Targets setting is enabled in the FHIR Storage module configuration (as shown above), and the Allow Inline Match URL References Enabled setting is also enabled, you can refine the behavior shown above further.

In this case, it is possible to use an inline match URL instead of a hardcoded resource ID, and you can then achieve similar behavior to the Transaction Bundle use case.

Consider the following Observation being POSTed to /Observation.

Example: Auto-create placeholders for reference targets with identifiers


Example: Auto-create placeholders for reference targets with identifiers

In this case, the reference is treated as a local search (in this case for a Patient with the identifier included in the inline match URL) and executed as such.

If the search finds zero results, a new Patient resource is created. If the inline match URL uses an identifier as it does here, Patient.identifier is populated with the inline match URL's identifier system and value. The reference is then automatically replaced with a reference to this new Patient.

If the search finds one result, the reference is automatically replaced with a reference to the found Patient and no placeholder reference target is created.

Note:

We use Patient as an example; this applies to any reference targets that include an Identifier element.