FHIR Chat · polymorph member validation error · dotnet

Stream: dotnet

Topic: polymorph member validation error


view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:19):

I am getting an error "Encountered polymorph member patient, but is does not specify the type used". Can someone explain this to me?

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:46):

ok... it seems to be related to Claim.patient

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:46):

After I removed "patient" from claim, it parsed by fhir-net-api just fine

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:46):

Debugging the code a bit, it seems that it thinks Claim.patient is a choice data type

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:47):

And is looking for it to be something like "patientReference" instead of "patient"

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:47):

I believe "patient" is correct, though... The spec shows it should be "patient" and always should be a data-type of "reference"

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:47):

so I think this *might* be a bug in the fhir-net-api

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 00:48):

@Ewout Kramer , can you comment when you get a chance?

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 14:06):

perhaps it is just that I am using the wrong branch? I am using the ft-connectathon-sep2016 branch

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 14:06):

should I switch branches to the ft-connectathon-jan2017 branch?

view this post on Zulip Sean McIlvenna (Nov 22 2016 at 14:07):

it seems there are some very recent commits to that branch, maybe it matches the build.fhir.org spec more than sep2016?

view this post on Zulip Brian Postlethwaite (Nov 23 2016 at 05:55):

That jan2017 branch is a 1.7 build, which is the current continuous build one (from a week or 2 back) so depending on the server you connect to, you'll get different results.

view this post on Zulip Brian Postlethwaite (Nov 23 2016 at 05:56):

The sep2016 is the correct branch there, but it's not being maintained anymore.

view this post on Zulip Ewout Kramer (Dec 01 2016 at 12:41):

@Ewout Kramer , can you comment when you get a chance?

I did some research and the only way this error can be reached is then Claim.patient is a choice type. Which is when the element in the Claim class file is marked with a [FhirElement] attribute which has a Choice=ChoiceType.DatatypeChoice argument. This is not the case in the DSTU2 generated files

view this post on Zulip Ewout Kramer (Dec 01 2016 at 12:45):

@Brian Postlethwaite , can you see whether this is the case in the STU3 stuff?

view this post on Zulip Ewout Kramer (Dec 05 2016 at 16:53):

Ok, just so we don't forget to check this issue, I have added it to the issues list on github: https://github.com/ewoutkramer/fhir-net-api/issues/274


Last updated: Apr 12 2022 at 19:14 UTC