LRGVG2 ; IHS/DIR/FJE - VERIFY GENERAL DATA AS A GROUP,CONT. 2/22/87 2:00 PM ;
;;5.2;LR;**1013**;JUL 15, 2002
;
;;5.2;LAB SERVICE;;Sep 27, 1994
DC ;from LRGVG1
S V="",LROV="" S:$D(^LR(LRDFN,"CH",LRIDT,0)) @("V="_LRLL(LRII)) IF LRODT'=-1 S:$D(^LR(LRDFN,"CH",LRODT,0)) @("OV="_LRLL(LRII))
Q:V=""!(V["pending")
IF $P(^TMP($J,LRII),U,8)=1 S LRDV=$P(^(LRII),U,9) I V'=""&(LROV'="") S X3=V-LROV S:X3<0 X3=-X3 I X3>LRDV S LRDELTA=1 S:V'["#" $P(^LR(LRDFN,"CH",LRIDT,+$P(LRLL(LRII),"(^(",2)),U,+$P(LRLL(LRII),",U,",2))=V_"#" Q
S LRCL=$P(^TMP($J,LRII),U,2),LRCH=$P(^(LRII),U,3) IF $L(LRCL),LRCL]""&(V<LRCL) S:V'["L" $P(^LR(LRDFN,"CH",LRIDT,+$P(LRLL(LRII),"(^(",2)),U,+$P(LRLL(LRII),",U,",2))=V_"L"
IF $L(LRCH),LRCH]""&(V>LRCH) S:V'["H" $P(^LR(LRDFN,"CH",LRIDT,+$P(LRLL(LRII),"(^(",2)),U,+$P(LRLL(LRII),",U,",2))=V_"H"
S LRCL=$P(^TMP($J,LRII),U,4),LRCH=$P(^(LRII),U,5) IF $L(LRCL_LRCH),(LRCL]""&(V<LRCL))!(LRCH]""&(V>LRCH)) S LRCRIT=1 S:V'["*" $P(^LR(LRDFN,"CH",LRIDT,+$P(LRLL(LRII),"(^(",2)),U,+$P(LRLL(LRII),",U,",2))=V_"*" Q
Q
LRGVG2 ; IHS/DIR/FJE - VERIFY GENERAL DATA AS A GROUP,CONT. 2/22/87 2:00 PM ;
+1 ;;5.2;LR;**1013**;JUL 15, 2002
+2 ;
+3 ;;5.2;LAB SERVICE;;Sep 27, 1994
DC ;from LRGVG1
+1 SET V=""
SET LROV=""
IF $DATA(^LR(LRDFN,"CH",LRIDT,0))
SET @("V="_LRLL(LRII))
IF LRODT'=-1
IF $DATA(^LR(LRDFN,"CH",LRODT,0))
SET @("OV="_LRLL(LRII))
+2 IF V=""!(V["pending")
QUIT
+3 IF $PIECE(^TMP($JOB,LRII),U,8)=1
SET LRDV=$PIECE(^(LRII),U,9)
IF V'=""&(LROV'="")
SET X3=V-LROV
IF X3<0
SET X3=-X3
IF X3>LRDV
SET LRDELTA=1
IF V'["#"
SET $PIECE(^LR(LRDFN,"CH",LRIDT,+$PIECE(LRLL(LRII),"(^(",2)),U,+$PIECE(LRLL(LRII),",U,",2))=V_"#"
QUIT
+4 SET LRCL=$PIECE(^TMP($JOB,LRII),U,2)
SET LRCH=$PIECE(^(LRII),U,3)
IF $LENGTH(LRCL)
IF LRCL]""&(V<LRCL)
IF V'["L"
SET $PIECE(^LR(LRDFN,"CH",LRIDT,+$PIECE(LRLL(LRII),"(^(",2)),U,+$PIECE(LRLL(LRII),",U,",2))=V_"L"
+5 IF $LENGTH(LRCH)
IF LRCH]""&(V>LRCH)
IF V'["H"
SET $PIECE(^LR(LRDFN,"CH",LRIDT,+$PIECE(LRLL(LRII),"(^(",2)),U,+$PIECE(LRLL(LRII),",U,",2))=V_"H"
+6 SET LRCL=$PIECE(^TMP($JOB,LRII),U,4)
SET LRCH=$PIECE(^(LRII),U,5)
IF $LENGTH(LRCL_LRCH)
IF (LRCL]""&(V<LRCL))!(LRCH]""&(V>LRCH))
SET LRCRIT=1
IF V'["*"
SET $PIECE(^LR(LRDFN,"CH",LRIDT,+$PIECE(LRLL(LRII),"(^(",2)),U,+$PIECE(LRLL(LRII),",U,",2))=V_"*"
QUIT
+7 QUIT