Written by

Technical Delivery Master at Deloitte
Question Michael Wood · Jun 6, 2024

API Response truncating?

I have an API that does not have all the data.  Like it is truncated. Magic number of characters seems to be 163,280

I do an <assign> 

context.RawBundle=##class(%DynamicObject).%FromJSON(context.FHIRResponse.Body)

The error does not happen when the response is < 163,280 chars.  And when < 163,280 chars, it is a complete FHIR Bundle.  Have anyone experienced this?  If so, what is the resolution?

Product version: IRIS 2021.1

Comments

Luis Angel Pérez Ramos · Jun 10, 2024

Hi @Michael Wood ! What is the type of context.FHIRResponse.Body? Interoperability with FHIR usually works with HS.FHIRServer.Interop.Response class in wich the JSON FHIR is saved as a Stream.

Could you tell us something else about what are you doing?

0
Michael Wood  Jun 10, 2024 to Luis Angel Pérez Ramos

Thanks for you response. It turns out that it was a litimation of %String.  I defined the Body property as %GlobalBinaryStream.  That worked to pull all the response.  

0