Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BGP0ASL1

BGP0ASL1.m

Go to the documentation of this file.
BGP0ASL1 ; IHS/CMI/LAB - DISPLAY IND LISTS 28 Apr 2006 2:10 PM ;
 ;;10.0;IHS CLINICAL REPORTING;;JUN 18, 2010
 ;; ;
NGR ;EP
 K BGPTIND S BGPHIGH=""
 S BGPSUCNT=0,BGPSU="",BGPSUC=0
 S BGPX=0 F  S BGPX=$O(^BGPGPDCT(BGPX)) Q:BGPX'=+BGPX  S V=$G(^BGPGPDCT(BGPX,0)) D
 .Q:'$D(^BGPGPDCT(BGPX,0))
 .Q:$P(V,U)'=BGPBD
 .Q:$P(V,U,2)'=BGPED
 .Q:$P(V,U,7)'=BGPPER
 .I $G(BGP0GPU),$P(V,U,12)'=9 Q
 .I '$G(BGP0GPU),$P(V,U,12)'=1 Q
 .I $G(BGPCHWE) Q:'$O(^BGPGPDCT(BGPX,88888,0))
 .Q:$P(V,U,5)'=BGPBBD
 .Q:$P(V,U,6)'=BGPBED
 .Q:$P(V,U,14)'=BGPBEN
 .S BGPSUC=BGPSUC+1,BGPTIND(BGPSUC,0)=BGPSUC_")"
 .S Y=""
 .S $E(Y,4)=$E($$SU($P(V,U,11)),1,10)
 .S $E(Y,15)=$E($$FAC($P(V,U,9)),1,13)_$S($P(^BGPGPDCT(BGPX,0),U,17):"+",1:"")
 .S $E(Y,30)=$$DATE^BGP0UTL($P(V,U))
 .S $E(Y,40)=$$DATE^BGP0UTL($P(V,U,2))
 .S $E(Y,50)=$$DATE^BGP0UTL($P(V,U,5))
 .S $E(Y,60)=$$DATE^BGP0UTL($P(V,U,6))
 .S $E(Y,70)=$$DATE^BGP0UTL($P(V,U,13))
 .S BGPTIND(BGPSUC,0)=BGPTIND(BGPSUC,0)_Y
 .S BGPTIND(BGPSUC,BGPSUC)=BGPX
 .I $D(BGPSUL(BGPX)) S BGPTIND(BGPSU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