Something like this operation should do it for you.

 

Class Component.Outbound.JsonHttpsOut Extends Ens.BusinessOperation
{

Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter";

Property Adapter As EnsLib.HTTP.OutboundAdapter;

Method SendMessage(pMsgOut As %DynamicObject, Output pMsgIn As %Net.HttpResponse) As %Status
{
    S tSC=$$$OK
    Set tHttpRequest=##class(%Net.HttpRequest).%New(), tHttpRequest.WriteRawMode=1, token =##class(%DynamicObject).%New(), tSC=$$$OK
    Set tHttpRequest.SSLConfiguration=..Adapter.SSLConfig
    Set tSC = tHttpRequest.SetHeader("Content-Type", ..ContentType)
    d tHttpRequest.EntityBody.Write(pMsgOut.%ToJSON())
    #dim tHttpResponse As %Net.HttpResponse
    Set tHttpResponse = ##class(%Net.HttpResponse).%New()
    S send="POST"
    Set tSC=..Adapter.SendFormDataArray(.tHttpResponse, send, tHttpRequest)
    if (tHttpResponse.StatusCode="200"){
        set message=tHttpResponse.StatusCode_": "_tHttpResponse.StatusLine_". "
        if $IsObject(tHttpResponse.Data) 
        {
               while 'tHttpResponse.Data.AtEnd {
                   set message=message_tHttpResponse.Data.Read(,.tSC1) 
                   if 'tSC1 quit
            }
            $$$TRACE(message)
            s tSC=$$$ERROR("9999",message)
        }
        s tSC=$$$OK
        }
    else
    {
        set message=tHttpResponse.StatusCode_": "_tHttpResponse.StatusLine_". "
        if $IsObject(tHttpResponse.Data) 
        {
               //set message="" 
               while 'tHttpResponse.Data.AtEnd {
                   set message=message_tHttpResponse.Data.Read(,.tSC1) 
                   if 'tSC1 quit
            }
            $$$TRACE(message)
            s tSC=$$$ERROR("9999",message)
        }
        Set ..Adapter.URL=$REPLACE(..Adapter.URL,..tmpurl,"")    //sets adapter url back to standard if it was last used to remove an MRN
    }

    Q tSC
}

#dim tResponse As HS.FHIRServer.Interop.Response
Set tSC = ..SendRequestSync(..TargetConfigName, tRequest, .tResponse)
if (($P(tResponse.Response.Status," ",1)>199) && ($P(tResponse.Response.Status," ",1)<399))
{ Set tResponseQuickStream = ##class(HS.SDA3.QuickStream).%OpenId(tResponse.QuickStreamId)
Set tSC = $$$ERROR($$$GeneralError, tResponseQuickStream.Read())
//Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(tResponseQuickStream,"vR4")
Set BundleObject=##class(%DynamicObject).%FromJSON(tResponseQuickStream)

}

if (($P(tResponse.Response.Status," ",1)>199) && ($P(tResponse.Response.Status," ",1)<399))
{
Set tResponseQuickStream = ##class(HS.SDA3.QuickStream).%OpenId(tResponse.QuickStreamId)
Set tSC = $$$ERROR($$$GeneralError, tResponseQuickStream.Read())
Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(tResponseQuickStream,"vR4")
Quit BundleObject
}

You can use the line similar to below instead of Bundle if you are unsure of the payload as well

BundleObject=##class(%DynamicObject).%FromJSON(tResponseQuickStream)