Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

ID fields of converted Avro records are not expected to be fully qualified URLs. #106

Open
bashir2 opened this issue Nov 6, 2020 · 1 comment

Comments

@bashir2
Copy link

bashir2 commented Nov 6, 2020

Please fill out the below template as best you can.

Description of Issue

I am not sure if this is WAI or a bug.

I am using Bunsen for converting HAPI FHIR objects to Avro GenericRecords using resourceToAvro. The id field of the converted records have the full URL of the original server from which the resources are fetched. It seems to me that according to the FHIR documentation this is not correct (e.g., invalid characters). In my particular use case, I am only interested in the logical ID (getIdPart()) of the resource IDs.

After some debugging, it seems that the issue is here which eventually ends up calling getValue() which calls IdType.getValue(). I wonder if there is any way to have the IdType.getIdPart() of an ID element in the converted record instead?

System Configuration

Project Version

0.5.7

Additional Details (optional)

Steps to Reproduce the Issue

  1. Create a FHIR resource objects.
  2. Call resourceToAvro on that.

Expected Outcomes

I was expecting to only get the logical ID in the id fields of generated records, not the fully qualified URLs.

@bashir2
Copy link
Author

bashir2 commented Nov 2, 2021

A fix for this issue can be found here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant