Firstly, I was trying to reproduce this bug. I’ve just picked some random encounter’s UUID on my local 2.6-SNAPSHOT Reference Application distro and sent this URL to server:
It should return
Encounter represented as in diagram below:
Exception is thrown as expected.
I’ve looked into
Encounter model and noticed, that
Provider object is not in
Encounter directly, but it is contained in
I’ve tweaked URL so it looked like that:
That request’s response is returns correct custom Encounter, as defined in URL.
Next move, lets add custom representation of Provider to URL by changing
I’ve debugged some webservices.rest code and I spotted something weird in
getCustomRepresentationDescription(). This method parses custom representation properties from request URL String. Works nice, until there is no more than “2 levels of custom representation complexity” (IDK how to call that). For example:
custom:(patient:(gender)) - OK
getCustomRepresentationDescription() is called twice.
patientproperty to encounter’s description
genderproperty to patient’s description
custom:(patient:(person:(gender))) - Exception
getCustomRepresentationDescription() should be called 3 times.
patientproperty to description
perso(Yes, no ‘n’ letter) property to description
- exception before it could be called 3rd time.
My question is: Is custom representation limited to “2 levels of complexity” or is it a bug?
Anyway, its weird that
Provider object couldn’t be accessed directly from ‘Encounter’ (just as
gender). Any ideas why is it happening?