Question
· Jan 19

FHIR payload to FHIR message class

I have this response, which is a FHIR location resource in a bundle. I would like to load the entry(0).resource into a context property defined as HS.FHIR.DTL.vR4.Model.Resource.Location so I can use it as a source in a DTL.  Any help would be greatly appreciated.  Thanks. 

{"entry":[{"fullUrl":"https://dev-api.hosp.org/idkl/fhir/r4/v1/Location/ATH-1375-PRV-a-1375.De...","resource":{"extension":[{"url":"https://api.hosp.org/idkl/extensions/StructureDefinition/is-messaging-en...","valueBoolean":true}],"id":"ATH-1375-PRV-a-1375.Department-2","identifier":[{"system":"urn:asc:idkl:ATH:1375:location:department-id","value":"2"},{"system":"urn:asc:idkl:clt:1375:location:base-id","value":"2"},{"system":"urn:asc:idkl:clt:1375:sourceid","value":"a-1375.Department-2"},{"system":"urn:asc:idkl:clt:1375:location:id","value":"a-1375.Department-2"}],"managingOrganization":{"identifier":{"system":"urn:asc:idkl:clt:instance:id","value":"1375"},"reference":"Organization/SYM-DEV-ATH-1375-PRV","type":"Organization"},"meta":{"lastUpdated":"2024-01-17T02:19:09.889639+00:00","source":"ATH-1375-PRV","tag":[{"code":"UNMASTERED","display":"Unmastered Location"},{"code":"HC-Reltio-API","system":"https://api.hosp.org/idkl/value-sets/data-sources"},{"code":"IDKL-EHR-API","display":"IDKL from EHR's API"}],"versionId":"MTcwNTQ1Nzk0OTg4OTYzOTAwMA"},"partOf":{"identifier":{"system":"urn:asc:idkl:rlt:ahnat:location:id","value":"07vMu2k"},"reference":"Location/RLT-DEV-07vMu2k","type":"Location"},"resourceType":"Location"},"search":{"mode":"match"}}],"link":[{"relation":"search","url":"https://dev-api.hosp.org/idkl/fhir/r4/v1/Location?identifier=urn%3Aasc%3..."},{"relation":"first","url":"https://dev-api.hosp.org/idkl/fhir/r4/v1/Location?identifier=urn%3Aasc%3..."},{"relation":"self","url":"https://dev-api.hosp.org/idkl/fhir/r4/v1/Location?identifier=urn%3Aasc%3..."}],"resourceType":"Bundle","total":1,"type":"searchset"}

Product version: IRIS 2022.2
Discussion (4)4
Log in or sign up to continue

I have similar requirement ; I would like to send bundle object to a router and then
 perform a DTL with in the routing rule ( this BundleObject as a souce to my DTL).
 during this process , I get below expection 
 
 reqStream = json content in a stream
 
 Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")
 
 Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", BundleObj)
 
 expection :
 
 ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''