FHIR Chat · Trouble with placeholder IDs from Synthea · hapi

Stream: hapi

Topic: Trouble with placeholder IDs from Synthea


view this post on Zulip Daniel Vreeman (Dec 30 2020 at 23:49):

I'm trying to load some synthetic data generated by Synthea . Organizations load fine, but the Practitioner bundle fails with messages like:

"Unable to satisfy placeholder ID urn:uuid:d6c9c111-f4ed-3768-b6f0-e9983b6fa865 found in element named 'practitioner' within resource of type: PractitionerRole"

This happens on both the Logica Sandbox and our SmileCDR instance (which is configured with server IDs to be created with UUIDs). Any thoughts? @James Agnew @Jason Walonoski

Thanks!

view this post on Zulip Jason Walonoski (Jan 04 2021 at 21:57):

For those reading, the practitioner bundle should contain only Practitioner and PractitionerRole resources. Reviewing some freshly generated bundles... and nothing seems out of the ordinary as far as I can tell. Do any patient bundles load?

view this post on Zulip Jason Walonoski (Jan 04 2021 at 21:57):

Is the given identifier urn:uuid:d6c9c111-f4ed-3768-b6f0-e9983b6fa865 actually in your bundle?

view this post on Zulip Daniel Vreeman (Jan 07 2021 at 16:02):

Thanks @Jason Walonoski . Yes, the Practitioner bundles created have only Practitioner and PractitionerRole resources. In the example above, the Practitioner resource with that uuid is in the bundle (just before the PractitionerRole that references it).

On SmileCDR, I was able to get the Patient bundles to load (without doing the Practitioner bundle) by enabling "Allow Inline Match URL References Enabled" (in addition to "Auto-Create Placeholder Reference Targets" which I had on previously). https://smilecdr.com/docs/configuration_categories/fhir_configuration.html

For my main project needs, I'm good now b/c I'm focused on the patient data.

However, others may be looking to do this with Logica. In my Logica R4 sandbox, when I post the Practitioner bundle, all of the Practitioner resources are successfully created, but all the PractitionerRole resources from that bundle fail (400) with a message as above. Attempting a Patient Bundle resource load then also fails with the message: "Invalid match URL "Practitioner?identifier=https://github.com/synthetichealth/synthea|d6c9c111-f4ed-3768-b6f0-e9983b6fa865" - No resources match this search.

Makes sense because the Practitioner resources that do load have not not retained the uuid as an identifier, e.g.:

https://api.logicahealth.org/SDCTest/open/Practitioner/16173

view this post on Zulip Lin Zhang (Jan 07 2021 at 19:25):

A possibly similar case for hapi r4 (v5.1.0): I had to use the identifier value only without the system uri in the request.ifNoneExists to do the matching within the transaction bundle.

view this post on Zulip Jason Walonoski (Jan 07 2021 at 22:45):

Daniel Vreeman said:

However, others may be looking to do this with Logica. In my Logica R4 sandbox, when I post the Practitioner bundle, all of the Practitioner resources are successfully created, but all the PractitionerRole resources from that bundle fail (400) with a message as above. Attempting a Patient Bundle resource load then also fails with the message: "Invalid match URL "Practitioner?identifier=https://github.com/synthetichealth/synthea|d6c9c111-f4ed-3768-b6f0-e9983b6fa865" - No resources match this search.

Makes sense because the Practitioner resources that do load have not not retained the uuid as an identifier

Ah, yes. I see. @Marc Hadley We may need to relook at the identifiers across transaction bundles with the practitioner bundle in particular.

view this post on Zulip Marc Hadley (Jan 08 2021 at 21:49):

This is tricky. The practitioner bundle is a batch since we are trying to avoid creating duplicate practitioners via ifNoneExists. If we used a transaction then all of the practitioners would fail to load if only one of them already exists. But, it sounds like these servers are replacing the resource ids on each Practitioner prior to processing the corresponding PractitionerRole so the reference from the latter to the former is failing. You can only use search references (e.g. Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999999559) within transactions so we can't switch to using those in the practitioner bundle for the reason described earlier.

view this post on Zulip Marc Hadley (Jan 08 2021 at 21:52):

I do see a bug in the patient bundle we generate where some of the query references to practitioners (from EOB and Coverage) are using the practitioner UUID instead of the NPI - I can fix those.

view this post on Zulip Marc Hadley (Jan 08 2021 at 21:56):

One possible approach would be to create a transaction bundle for each pair of Practitioner and PractitionerRole, that would allow the references to work correctly and keep practitioners separate so we don't fail to load them all if only one (or more) already exist.

view this post on Zulip Marc Hadley (Jan 13 2021 at 22:13):

Proposal: change the references from PractitionerRole to Practitioner, Location and Organization to be logical references (Reference.identifier) instead of literal (Reference.reference). This would match the reference in the hospital bundle from Location to Organization.

view this post on Zulip Marc Hadley (Jan 13 2021 at 22:13):

(deleted)

view this post on Zulip Marc Hadley (Jan 13 2021 at 22:27):

@Daniel Vreeman @Lin Zhang Thoughts?

view this post on Zulip Lin Zhang (Jan 13 2021 at 23:31):

@Marc Hadley Thanks. I have no experience with Synthea although it's already downloaded. And I'm interested to use it.

view this post on Zulip Daniel Vreeman (Jan 14 2021 at 18:37):

@Marc Hadley I think that should work. I manually mocked up an example using the Reference.identifier approach and the bundles loaded in Logica successfully, but will admit that I'm not an expert on the tradeoffs of logical vs literal references.

view this post on Zulip Grey Faulkenberry (Apr 12 2021 at 19:46):

Hello!
First, thanks for everyone who works on the synthea tool, I hadn't delved into it much before, but it's amazingly useful.
Second, I was wondering if there were any suggestions for an issue I've run into. I'm trying to upload synthea data to google cloud. It generally goes ok, except to references for Practitioners and Organizations. So my first step was to upload these first, so that way I would know that they were on the server.

But it still gives me a parsing error: "an error occurred while reading the record starting at byte 0: error in parsing references Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999907989"

Has anyone else run into this issue? Is it a problem with how google has implemented their FHIR server?

view this post on Zulip Richard Stanley (Apr 13 2021 at 20:15):

Hi @Grey Faulkenberry Synthea only creates bundles of type transaction. So I think that everything must be resolved for the transaction to be successful or it fails. I got past this by POSTing the hospital file, then practitioner after that. Do you have a hospitals/primary care locations file?

view this post on Zulip Grey Faulkenberry (Apr 13 2021 at 20:19):

I do. I run synthea with the bulk option on, and I have a hospitalInformation.json file and a practitionerInformation.json file. I can upload those as bundles, and that works properly. But then I have Patient.ndjson, Medication.ndjson, Provenenance.ndjson, etc.

view this post on Zulip Grey Faulkenberry (Apr 13 2021 at 20:19):

The Patient.ndjson loads fine, but any of the ones that reference a Provider fail

view this post on Zulip Richard Stanley (Apr 13 2021 at 20:24):

Hmm. That sounds frustrating. Does your use case require bulk or can you use the default (patient bundles) to get around this issue?

view this post on Zulip Grey Faulkenberry (Apr 13 2021 at 20:35):

Haha, actually, you may have just given me the answer. I assigned: "exporter.fhir.transaction_bundle = false", which causes it to create as a collection bundle, which seems to let me upload.

view this post on Zulip Richard Stanley (Apr 13 2021 at 20:48):

Interesting. I'm not familiar with that option. So, with 'true' it works? Or the other way around?

view this post on Zulip Grey Faulkenberry (Apr 13 2021 at 20:54):

No with false it works. With true, all of the bundles were transaction bundles, and it apparently didn't like something about the cross references. With collection, it doesn't put the same constraints on the data uploaded. In the long run probably not how I should do it, but I'm still learning the platform, so I was really just trying to get the data uploaded.


Last updated: Apr 12 2022 at 19:14 UTC