Question
· Jun 3

FHIR Deserialize JSON FHIR to object Model

I am trying to work with the FHIR Object Model where I convert an incoming  HL7v2 to SDA then FHIR. From here I would like to be able to process the FHIR Object by deserializing it to a Bundle object using the following code my problem is I keep on getting an error  which is not explaining much about what is wrong with what I am doing any help will be appreciated  thanks.

Property FHIRAdapter As HS.JSON.AdaptorFHIR;

Method OnRequest(pRequest As HS.Message.FHIR.Request, Output pResponse As HS.Message.FHIR.Response) As %Status
{

             set pmReqFHIRobj=##class(HS.FHIR.Model.Resource.Bundle).%New()
            do ..FHIRAdapter.%FromFHIRJSON(pRequest.Payload.Read(),.pmReqFHIRobj,"HS.FHIR.Model.Resource.Bundle")

}

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.4 (Build 505_1U) Thu May 28 2020 10:01:40 EDT [HealthShare Modules:Core:15.032.9035 + Linkage Engine:15.032.9035]
Discussion (3)3
Log in or sign up to continue

I have tried what you suggested but still getting the same error <INVALID OREF> have also checked to see if the JSON string is present and checked on the instantiated object can not pin point where the error is coming from had look here they had the same problem but my guess is we are using different versions as I don't have this class in my version  HS.FHIR.Validation.ResourceValidator