Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-816

Error can occur when you try to fetch a custom rep of an Encounter and one or more the nested obs is of type "valueLocation" or "valueDrug"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 2.30.0
    • 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.

      Gliffy Diagrams

        Attachments

          Activity

            People

              mogoodrich Mark Goodrich
              mogoodrich Mark Goodrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: