Hello,
I need to do a data migration to a hapi fhir server. The data is provided as "ndjson" files where the resources of each resource type are collected per file.
With the hapi fhir CLI tool I am trying to do a bulk import now. The files should be structured correctly and I can also start the task, but it fails because of the references.
2 scenarios:
1) auto_create_placeholder_reference_targets: true
If this setting is enabled on my hapi server, then placeholder resources are created correctly. The problem is that when the import hits the actual resource with this id, then it fails with this error: "JobStepFailedException: HAPI-2041: HAPI-0550: HAPI-0825: The operation has failed with a client-assigned ID constraint failure. This typically means that multiple client threads are trying to create a new resource with the same client-assigned ID at the same time, and this thread was chosen to be rejected. It can also happen when a request disables the Upsert Existence Check."
2) auto_create_placeholder_reference_targets: true
If this setting is disabled on my hapi server, then no placeholder resources are created and if the reference target resource has not yet been created, the task fails with e.g. this error:
"InvalidRequestException: HAPI-1094: Resource Patient/123 not found, specified in path: Immunization.patient"
This is how I start the tool:
Am I doing something fundamentally wrong? Or did I misunderstand how the tool is inteded to work?
Would be glad for any advice.
Best,
Johanna