Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was 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

Description

@bashir2

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.

Activity

  1. bashir2 commented on Nov 2, 2021

    @bashir2
    Author

    A fix for this issue can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions