Details
-
Bug
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
-
None
Description
In one of our OWAs, I’m trying to fetch an Encounter RESTfully using a custom representation. A simplifed version of the rep I’m using:
custom:(id,uuid,encounterDatetime,obs:(id,uuid,value:(id,uuid,display,names:(id,uuid,name,locale,localePreferred,voided,conceptNameType)),obsDateime))
When pulling back the the obs on an encounter, if one of the obs has a value of a “Location” or "Drug", it fails when trying to convert a “Location” or "Drug" to this custom ref:
(id,uuid,display,names:(id,uuid,name,locale,localePreferred,voided,conceptNameType))
So, the underlying problem is polymorphic nature of the "value" property of Obs. We will start a discussion about an overall fix for this, but this ticket is simply about putting in a hack so that the REST request won't fail entirely if there's a Obs of type Location or Drug in the response... it will simply set the value of that field to null.