User bio
404 bio not found
Member since Dec 21, 2022
Posts:
Michael has not published any posts yet.
Replies:

InitializeXMLParse does a lot of necessary things including the following:

  1. Calls Rewind() on its stream property
  2. Uses XSL "OrderSDAElements" or "OrderSDAElementsEdge" to sort the SDA objects in the container.
  3. Replace the stream property on HS.SDA3.Container  with the sorted one
  4. Call Rewind() again and initialize a StreamPos property to 1   // This is used by FillBuffer()
  5. Initialize the ..StreamBuffer with the first 3600000 bytes of the stream 

This is a lot of overhead.  Also, "do oSDA.StreamOref.Rewind()" and "oSDA.StreamPos = 1" fails to re-initialize the ..StreamBuffer.

My suggestion would be to declare a MultiDimensional property in your class:
Property %sdaclass [ MultiDimensional, Private ];

Then follwing any call to GetNextSDA, save the SDA class in the MultiDimensional:
set ..%sdaclass($increment(%sdaclass))=tPatient     // replace tPatient with variable returned by GetNextSDA 

Your second pass can simply iterate over the MultiDimensional:
set subscript=""
for {
   set subscript=$order(..%sdaclass(subscript))
   quit:subscript=""

    set sdaclass=..%sdaclass(subscript)

    ... processing logic B

}
 

Certifications & Credly badges:
Michael has no Certifications & Credly badges yet.
Global Masters badges:
Michael has no Global Masters badges yet.
Followers:
Michael has no followers yet.
Following:
Michael has not followed anybody yet.