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

fix for type cast exception while converting from hapi object to avro specific record #67

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

amarvakul
Copy link
Contributor

Summary

Closes #66, resolving exception.

  • Added new unit test.

@@ -161,7 +161,6 @@
<argument>http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter</argument>
<argument>http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization</argument>
<argument>http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication</argument>
<argument>http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest</argument>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we're removing this resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to generate an avro class that has contained resource inline instead from maven plugin. As you suggested the prior test is sufficient.
reverted the change 2a1ef48

resourceTypeUrls
.put("http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest",
ImmutableList.of("http://hl7.org/fhir/StructureDefinition/Provenance"));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is part of the tools code (and not really itself testing code), let's remove this addition. The prior test should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted 2a1ef48

@@ -34,6 +34,7 @@
import org.apache.avro.generic.GenericData.Record;
import org.apache.avro.generic.IndexedRecord;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.specific.SpecificRecord;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a needed import?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, removed in 2a1ef48

Copy link
Contributor

@bdrillard bdrillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks for the fix!

@bdrillard bdrillard merged commit 2597224 into cerner:0.5.0-dev Dec 17, 2019
@bdrillard
Copy link
Contributor

Merged!

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

Successfully merging this pull request may close these issues.

2 participants