Question
· Sep 17, 2020

Unable to set DG1 segment after cloning

My segment is not getting set with the new value though It goes into the if statement. Am I doing something wrong?

ClassMethod Clone(pRequest As EnsLib.HL7.Message) As EnsLib.HL7.Message [ Final ]

s cREQ = pRequest.%ConstructClone()

s DG1 = cREQ.FindSegment("DG1",.ind)

While (ind2 '="")

{
diag = DG1.GetValueAt(4.1)

if diag = "0"
{
tmp = "No code"
rc=DG1.SetValueAt(tmp,4.1)
}

}

DG1 = cREQ.FindSegment("DG1",.ind2)

request = cREQ
Quit request

}

Discussion (6)2
Log in or sign up to continue