LRGVG2 ;SLC/RWF - VERIFY GENERAL DATA AS A GROUP,CONT. ; 2/22/87 2:00 PM ;
;;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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRGVG2 1001 printed Nov 22, 2024@17:25:05 Page 2
LRGVG2 ;SLC/RWF - VERIFY GENERAL DATA AS A GROUP,CONT. ; 2/22/87 2:00 PM ;
+1 ;;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