Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Type null does not support undeclared extentions #299
I'm working on a Location matching project, similar to what's described in the "Patient Matching using an MPI" section here:
Here's a simple provider that always returns the same Location:
Here's a response:
I tried running this code to invoke it:
I get this error:
My response looks valid to me. It also looks consistent with the http://hl7.org/fhir/patient.html#match sample response.
Do you see anything wrong with the response? Is something wrong with my server code?
The "Type null does not support" error seems strange to me. It's like it finds the extension but loses track of which element contains the extension, causing it to say "Type null".
I tried running a response through FhirContext.forDstu2().newXmlParser().parseResource manually, and that worked with no error. So maybe there's something slightly different about how the RESTful client parses it.
I'm using HAPI FHIR 1.4.
Hi @am202 - I had a look at this and you're right, extensions in that position seem to cause an issue with the client.
I'm checking in a fix now, so this should work as of the next 1.5-SNAPSHOT build. Are you in a position to use snapshots?
One other thing to note though, you'll probably want to adjust your search method to return
@Search(queryName = "match", type=Location.class) public Bundle getMatchesReturnBundle(final @RequiredParam(name = Location.SP_NAME) StringParam name, final @Count Integer count);