Auto-create placeholders for reference targets

If the Auto-Create Placeholder Reference Targets setting (auto_create_placeholder_reference_targets) is enabled in the Oracle HDR FHIR server, it is possible to have the server automatically create an empty "placeholder" resource with a pre-assigned ID.

This technique is somewhat less complex than the example described in FHIR Transaction with conditional create, since it does not require a transaction bundle to be created. With this technique, the ID (not the identifier) of the target resource must be known. For example, the following payload could be POSTed to [baseUrl]/Observation, and would result in the creation of an empty resource with the ID Patient/ABC if one does not already exist. Note that if you want to be able to use this technique with purely numeric resource IDs you will also need to adjust the Client ID Mode.

Example: Auto-create placeholders for reference targets

{
  "resourceType": "Observation",
  "status": "final",
  "code": {
    "coding": [ {
      "system": "http://loinc.org",
      "code": "789-8"
    } ]
  },
  "subject": {
    "reference": "Patient/ABC"
  },
  "valueQuantity": {
    "value": 4.12,
    "system": "http://unitsofmeasure.org",
    "code": "10*12/L"
  }
}