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

BKMQSSR4.m

Go to the documentation of this file.
BKMQSSR4 ;PRXM/HC/CLT - STATE SURV. REPORT PRINT CONTINUED ; 27 Apr 2005  1:05 PM
 ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
 ;
 ;
EN ;EP - PRIMARY ROUTINE ENTRY POINT
 D UPD^BKMQUTL("")
 D SECTII
 D SECTIII
 D SECTIV
 Q
SECTII ;SECTION II PRINT
 Q:$P(^BKM(90456,1,2,2,0),U,4)'="Y"
 D UPD^BKMQUTL(" SECTION II: "_$P(^BKM(90456,1,2,2,0),U,2),1)
 F BKM=1:1:5 S BKMLINE=$P(^BKM(90456,1,2,2,1,BKM,0),U,1) D  ;Q:BKMX
 . I $P(^BKM(90456,1,2,2,1,BKM,0),U,2)="Y" D UPD^BKMQUTL(" "_BKMLINE_":")
 . D SECT2
 Q
SECT2 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,2,1,BKM,1)) D
 . S BKM1=0
 . F  S BKM1=$O(^BKM(90456,1,2,2,1,BKM,1,BKM1)) Q:'BKM1  D  ;Q:BKMX
 .. S BKMLINE1=$P(^BKM(90456,1,2,2,1,BKM,1,BKM1,0),U,1)
 .. D UPD^BKMQUTL(" "_BKMLINE1)
 Q
SECTIII ;SECTION III PRINT
 N LINE
 Q:$P(^BKM(90456,1,2,3,0),U,4)'="Y"
 D UPD^BKMQUTL(""),UPD^BKMQUTL(" SECTION III: "_$P(^BKM(90456,1,2,3,0),U,2))
 D UPD^BKMQUTL("")
 S LINE=""
 F BKM=1:1:15 S BKMLINE=$P(^BKM(90456,1,2,3,1,BKM,0),U,1) D  ;Q:BKMX
 . I $P(^BKM(90456,1,2,3,1,BKM,0),U,2)="Y" S LINE=" "_BKMLINE_": " D
 .. I BKM=1 D  Q
 ... I $G(BKMDIAG)]"" S LINE=LINE_BKMDIAG
 ... D UPD^BKMQUTL(LINE)
 ... D:$G(BKMDIAG)="" SECT3
 .. I BKM=2 D UPD^BKMQUTL(LINE_$S($D(BKMVAGED):BKMVAGED,1:"")) Q
 .. I BKM=3 D  Q
 ... I $G(BKMVDOB)]"" S LINE=LINE_$$FMTE^XLFDT(BKMVDOB\1,"5Z")
 ... D UPD^BKMQUTL(LINE)
 ... D:$G(BKMVDOB)="" SECT3
 .. I BKM=4 D UPD^BKMQUTL(LINE_$S($D(BKMVSTAT):BKMVSTAT,1:"")) D:'$D(BKMVSTAT) SECT3 Q  ; Variable not yet defined
 .. I BKM=5 D  Q
 ... I $G(BKMVDOD)]"" S LINE=LINE_$$FMTE^XLFDT(BKMVDOD\1,"5Z")
 ... D UPD^BKMQUTL(LINE)
 ... D:$G(BKMVDOD)="" SECT3
 .. I BKM=6 D UPD^BKMQUTL(LINE_$G(BKMVSDTH)) Q
 .. I BKM=7 D UPD^BKMQUTL(LINE_$G(BKMVSEX)) Q
 .. I BKM=8 D  Q
 ... I $G(BKMVETH)]"" S LINE=LINE_BKMVETH
 ... D UPD^BKMQUTL(LINE)
 ... D:$G(BKMVETH)="" SECT3
 .. I BKM=9 D  Q
 ... I $G(BKMVRCE)]"" S LINE=LINE_BKMVRCE
 ... D UPD^BKMQUTL(LINE)
 ... D:$G(BKMVRCE)="" SECT3
 .. I BKM=10 D UPD^BKMQUTL(LINE_$S($D(BKMVPOB):$S(BKMVPOB<52:"U.S.A.",1:"OTHER"),1:"UNKNOWN")) Q
 .. I BKM=11 D UPD^BKMQUTL(LINE) ; No data to print for this field
 .. I BKM=12 D UPD^BKMQUTL(LINE_$S($D(BKMVCITY):BKMVCITY,1:"")) Q
 .. I BKM=13 D UPD^BKMQUTL(LINE_$S($D(BKMVCNTY):BKMVCNTY,1:"")) Q
 .. I BKM=14 D UPD^BKMQUTL(LINE_$S($D(BKMVPST):BKMVPST,1:"")) Q
 .. I BKM=15 D UPD^BKMQUTL(LINE_$S($D(BKMVPZP):BKMVPZP,1:"")) Q
 Q
SECT3 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,3,1,BKM,1)) D
 . S BKM1=0
 . F  S BKM1=$O(^BKM(90456,1,2,3,1,BKM,1,BKM1)) Q:'BKM1  D  ;Q:BKMX
 .. S BKMLINE1=$P(^BKM(90456,1,2,3,1,BKM,1,BKM1,0),U,1)
 .. D UPD^BKMQUTL("   "_BKMLINE1)
 Q
SECTIV ;SECTION IV PRINT
 Q:$P(^BKM(90456,1,2,4,0),U,4)'="Y"
 D UPD^BKMQUTL(""),UPD^BKMQUTL(" SECTION IV: "_$P(^BKM(90456,1,2,4,0),U,2))
 D UPD^BKMQUTL("")
 F BKM=1:1:5 S BKMLINE=$P(^BKM(90456,1,2,4,1,BKM,0),U,1) D  ;Q:BKMX
 . I $P(^BKM(90456,1,2,4,1,BKM,0),U,2)="Y" S LINE=BKMLINE_": "
 . I BKM=1 D UPD^BKMQUTL(LINE_$S($D(BKMVLOC):BKMVLOC,1:"")) Q
 . I BKM=2 D UPD^BKMQUTL(LINE_$S($D(BKMVLCTY):BKMVLCTY,1:"")) Q
 . I BKM=3 D UPD^BKMQUTL(LINE_$S($D(BKMVLST):BKMVLST,1:"")) Q
 . I BKM=4 D UPD^BKMQUTL(LINE) D SECT4 Q
 . I BKM=5 D UPD^BKMQUTL(LINE) D SECT4 Q
 Q
SECT4 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,4,1,BKM,1)) D
 . S BKM1=0
 . F  S BKM1=$O(^BKM(90456,1,2,4,1,BKM,1,BKM1)) Q:'BKM1  D  ;Q:BKMX
 .. S BKMLINE1=$P(^BKM(90456,1,2,4,1,BKM,1,BKM1,0),U,1)
 .. D UPD^BKMQUTL(" "_BKMLINE1)
 Q