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A,B,E))
IF 'E
QUIT
DO T
+6 QUIT
T FOR LRT=0:0
SET LRT=$ORDER(^LR(LRDFN,LRSS,LRI,.1,A,B,E,1,LRT))
IF 'LRT
QUIT
SET X=^(LRT,0)
SET Y=$PIECE(X,"^",2)+$PIECE(X,"^",3)
SET X(6)=Y-$PIECE(X,"^",6)
IF X(6)>0
SET $PIECE(X,"^",6)=Y
SET $PIECE(X,"^",7)=X(6)
SET ^(0)=X
+1 QUIT
EN ;
+1 SET LRK(2)=0
IF LRSS'="AU"
GOTO LRAPWKA1
+2 FOR A=0:0
SET A=$ORDER(^LR(LRDFN,33,A))
IF 'A
QUIT
FOR B=0:0
SET B=$ORDER(^LR(LRDFN,33,A,B))
IF 'B
QUIT
SET E=0
FOR G=1:1
SET E=$ORDER(^LR(LRDFN,33,A,B,E))
IF 'E
QUIT
DO AUT
+3 QUIT
AUT FOR LRT=0:0
SET LRT=$ORDER(^LR(LRDFN,33,A,B,E,1,LRT))
IF 'LRT
QUIT
SET X=^(LRT,0)
SET Y=$PIECE(X,"^",2)+$PIECE(X,"^",3)
SET X(6)=Y-$PIECE(X,"^",6)
IF X(6)>0
SET $PIECE(X,"^",6)=Y
SET $PIECE(X,"^",7)=X(6)
SET ^(0)=X
+1 QUIT