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- REVIEW ITEMS FOR PO PRINT; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;ROUTINE TO REVIEW ITEMS FOR PO PRINT
EN DO EN1
EXIT KILL ACR,ACRDSC,ACRDSC1,ACRADSC
+1 QUIT
EN1 SET (ACR,ACRJ,ACRPOT,ACRPOTOT,ACRPOL,ACRPOL1)=0
+1 SET (ACRPOPG,ACRDC)=1
+2 FOR
SET ACR=$ORDER(^ACRSS("J",ACRDOCDA,ACR))
IF 'ACR
QUIT
Begin DoDot:1
+3 IF '$DATA(^ACRSS(ACR,0))!'$DATA(^ACRSS(ACR,"DT"))
QUIT
+4 SET ACRSSDT=^ACRSS(ACR,"DT")
+5 SET ACRJ=ACRJ+1
+6 SET ACRDSC=$GET(^ACRSS(ACR,"DESC"))
+7 SET ACRDSC1=$GET(^ACRSS(ACR,"NOTES"))
+8 SET ACRADSC=$PIECE($GET(^ACRSS(ACR,1,0)),U,3)
+9 SET ACRNMS=$GET(^ACRSS(ACR,"NMS"))
+10 IF $PIECE(ACRNMS,U)]""!($PIECE(ACRNMS,U,2)]"")
SET ACRPOL=ACRPOL+1
+11 SET ACRPOTOT=ACRPOTOT+$PIECE(ACRSSDT,U,9)
+12 SET ACRPOT=ACRPOT+$PIECE(ACRSSDT,U,4)
+13 FOR I=1:1:5
IF $PIECE(ACRDSC,U,I)]""
SET ACRPOL=ACRPOL+1
+14 FOR I=1:1:5
IF $PIECE(ACRDSC1,U,I)]""
SET ACRPOL=ACRPOL+1
+15 SET ACRPOL=ACRPOL+ACRADSC
End DoDot:1
+16 SET ACRPOTOT=ACRPOTOT-$PIECE($GET(^ACRDOC(ACRDOCDA,13)),U,8)
+17 SET ACRPOT=ACRPOT-$PIECE($GET(^ACRDOC(ACRDOCDA,13)),U,8)
+18 IF 'ACRPOT
SET ACRPOT=ACRPOTOT
+19 SET ACRPOL=ACRPOL+2
+20 IF $EXTRACT($PIECE(^ACRDOC(ACRDOCDA,0),U,3),5,7)>600
SET ACRPOL=ACRPOL+2
+21 IF ACRPOL>5
SET ACRPOPG=ACRPOPG+1+(ACRPOL\(IOSL-$SELECT($EXTRACT($GET(IOST),1,2)="P-":13,1:5)))
+22 QUIT