Eduard Lebedyuk · Oct 11, 2022 go to post

Test is a Get method arg:

Set tSc=Httprequest.Get(, 1)

Try this and compare the output to a successful request.

It's very likely your issue relates to mac, so you can also try:

Do Httprequest.InsertParam("mac", $zcvt("CC:1B:E0:E1:A6:44", "O", "URI"))
Eduard Lebedyuk · Oct 11, 2022 go to post

Try to define your parameters in a structured way:

Set Httprequest.Location="api/gap/nodes"
Do Httprequest.InsertParam("filter_rssi", -75)
Do Httprequest.InsertParam("chip", 1)
Do Httprequest.InsertParam("mac", "CC:1B:E0:E2:3C:10")
Do Httprequest.InsertParam("active", 1)
Do Httprequest.InsertParam("event", 1)
Set tSc=Httprequest.Get()

Also Get has a test parameter, try setting it to 1 to see what's being sent and compare to a successful request.

Eduard Lebedyuk · Oct 7, 2022 go to post

There are four entry points:

  • CanNodeStartToBecomePrimary
  • CheckBecomePrimaryOK
  • NotifyBecomePrimary
  • NotifyBecomePrimaryFailed

None of these entrypoints are related to DR promotion, so the answer is no.

UPD: to clarify none of these entrypoints are related to DR promotion to backup. Becoming primary event would work.

Eduard Lebedyuk · Oct 3, 2022 go to post

HS.SDA3.Container is a registered, not persistent object so you can't pass it between business hosts.

Pass xml stream instead.

Eduard Lebedyuk · Oct 3, 2022 go to post

GetSDA method accepts HL7 source in source variable and returns SDA stream in xml variable.

Eduard Lebedyuk · Sep 30, 2022 go to post

In your Business Service, assuming you are using EnsLib.HL7.Adapter.TCPInboundAdapter or something based on that as adapter, call:

write ..%Adapter.GetAddress()
Eduard Lebedyuk · Sep 29, 2022 go to post

Does not work with dynamic object class properties unfortunately:

Class User.DO Extends %Persistent
{

Property MyProp As %DynamicObject;

/// do ##class(User.DO).Test()
ClassMethod Test()
{
    do ..%KillExtent()
    // 11 = $length({"prop":""}.%ToJSON())
    for len = 100, $$$MaxStringLength - 11, $$$MaxStringLength - 11 + 1 {
        set sc = ..Create(len)
        write "len: ", len, " result: ", $case($$$ISOK(sc), $$$YES: "OK", : "ERROR: " _ $system.Status.GetErrorText(sc)), !
        quit:$$$ISERR(sc)
    }
}

ClassMethod Create(len) As %Status
{
    set obj = ..%New()
    do obj.MyProp.%Set("prop", ..GetStream(len), "stream")
    set sc = obj.%Save()
    quit sc
}

ClassMethod GetStream(len) As %Stream.TmpCharacter
{
    set chunk = 1000000
    set stream = ##class(%Stream.TmpCharacter).%New()
    for i=1:chunk:len-chunk {
        do stream.Write($tr($j("", chunk)," ", 0))		
    }
    do stream.Write($tr($j("", len#chunk)," ", 0))
    quit stream
}

}

Results in:

len: 100 result: OK
len: 3641133 result: OK
len: 3641134 result: ERROR: ERROR #5002: ObjectScript error: <MAXSTRING>%GetSerial+1^%Library.DynamicAbstractObject.1 [%GetSerial+1^%Library.DynamicAbstractObject.1:XF]

Same issue if there are several short properties in dynamic object with total length > 3641144 characters.

We need something like:

Property MyProp As %DynamicObject(STORAGE="stream");
Eduard Lebedyuk · Sep 29, 2022 go to post

If I define %DynamicObject property and its serialization is longer than 3641144 characters, would that work?

Eduard Lebedyuk · Sep 28, 2022 go to post

Yes, well, you explicitly set your error in:

do {
$$$ASSERT(0) // Subclass Responsibility
Set tSC = $$$EnsError($$$EnsErrNotImplemented,$$$CurrentClass,$$$CurrentMethod)
} while (0)
Exit
Quit tSC
Trap
Set $ZT="",tSC=$$$EnsSystemError
Goto Exit
} 

You need to remove that.

Also Patient info should be in SDA already, so you can remove:

Set target.Patient.Name=source.GetValueAt("PID:5")
Set target.Patient.BirthGender=source.GetValueAt("PID:8")
Eduard Lebedyuk · Sep 28, 2022 go to post

You need to create HS.SDA3.Container object in Transform method before using it. Something like this:

Class Hosiptal.SDA3.DataTrans Extends Ens.DataTransform
{

ClassMethod Transform(source As EnsLib.HL7.Message, ByRef target As HS.SDA3.Container, aux) As %Status
{
    #Dim sc As %Status = $$$OK
    Set sc =  ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(source, .xml)
    Quit:$$$ISERR(sc) sc
    Set target = ##class(HS.SDA3.Container).%New()
    Set sc = target.InitializeXMLParse(.xml)
    Quit sc
}

}
Eduard Lebedyuk · Sep 27, 2022 go to post

%String as defined by OP (without MAXLEN) only holds 50 characters, %VarString holds 3641144.

Eduard Lebedyuk · Sep 26, 2022 go to post

Great!

What's the purpose of:

C:\InterSystems\IRISHealth\bin>irispip install --target C:\InterSystems\IRISHealth\mgr\python numpy