With some help we created a function to loop through a repeating field and verify values against a single string, and a variation against a Lookup Table...

ClassMethod DoesSingleValueExistRepeatingSegmentFields(pHL7Msg As EnsLib.HL7.Message, pSegment As %String, pField As %String, pSubField As %String, pInputValue As %String) As %Boolean

{

   #dim tSeg as EnsLib.HL7.Segment

   set tSegCount = pHL7Msg.SegCountGet()

   set i = 1

   set j = 1

   Set tFound = 0

   //get new values

   set tval=""

   while ((i <= tSegCount) && (tval="")) {

     set tSeg = pHL7Msg.GetSegmentAt(i)

     if (tSeg.Name = pSegment) {

      set pField2 = pField_"(*)"

      set tRepCount = tSeg.GetValueAt(pField2)

      while ((j <= tRepCount) && (tval="")) {

        set tID = tSeg.GetValueAt(pField_"("_j_")"_"."_pSubField)

        if (pInputValue = tID) {

         set tval = 1

        }

       set j = j + 1

      }

     }

     set i = i + 1

   }

   if (tval '= "")

   {

      Q 1

   }

   quit 0

}
ObjectScript
ObjectScript

I am wondering if the Query against LDAP is taking too long and timing out in a response, even though he is getting an Invalid Username/password error returned but this happens when he tries to sign in from VS Code using /api/atelier. I tried increasing the timeout, but it doesn't seem to make a difference. I tried adjusting the Base DN search, and the Nested Group search to no avail.