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

BKMVSSR4.m

Go to the documentation of this file.
BKMVSSR4 ;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 HDR^BKMVSSR3 Q:BKMX
 D HDR1^BKMVSSR3
 D SECTII Q:BKMX
 D SECTIII Q:BKMX
 D SECTIV Q:BKMX
 Q
SECTII ;SECTION II PRINT
 Q:$P(^BKM(90456,1,2,2,0),U,4)'="Y"
 W !?1,"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 $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .W:$P(^BKM(90456,1,2,2,1,BKM,0),U,2)="Y" !?1,BKMLINE,":"
 .D SECT2
 Q
SECT2 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,2,1,BKM,1)) D
 .I $Y>(IOSL-$P(^BKM(90456,1,2,2,1,BKM,1,0),U,4)-2) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .S BKM1=0 F  S BKM1=$O(^BKM(90456,1,2,2,1,BKM,1,BKM1)) Q:'BKM1  D  Q:BKMX
 ..I $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 ..S BKMLINE1=$P(^BKM(90456,1,2,2,1,BKM,1,BKM1,0),U,1)
 ..W !?1,"  ",BKMLINE1
 Q
SECTIII ;SECTION III PRINT
 Q:$P(^BKM(90456,1,2,3,0),U,4)'="Y"
 W !!?1,"SECTION III: ",$P(^BKM(90456,1,2,3,0),U,2),!?1
 F BKM=1:1:15 S BKMLINE=$P(^BKM(90456,1,2,3,1,BKM,0),U,1) D  Q:BKMX
 .I $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .W:$P(^BKM(90456,1,2,3,1,BKM,0),U,2)="Y" !?1,BKMLINE,": " D
 ..I BKM=1 W:$G(BKMDIAG)]"" BKMDIAG D:$G(BKMDIAG)="" SECT3 Q
 ..I BKM=2 W $S($D(BKMVAGED):BKMVAGED,1:"") Q
 ..I BKM=3 W:$G(BKMVDOB)]"" $$FMTE^XLFDT(BKMVDOB\1,"5Z") D:$G(BKMVDOB)="" SECT3 Q
 ..I BKM=4 W $S($D(BKMVSTAT):BKMVSTAT,1:"") D:'$D(BKMVSTAT) SECT3 Q  ; Variable not yet defined
 ..I BKM=5 W:$G(BKMVDOD)]"" $$FMTE^XLFDT(BKMVDOD\1,"5Z") D:$G(BKMVDOD)="" SECT3 Q
 ..I BKM=6 W $G(BKMVSDTH) Q
 ..I BKM=7 W $G(BKMVSEX) Q
 ..I BKM=8 W:$G(BKMVETH)]"" BKMVETH D:$G(BKMVETH)="" SECT3 Q
 ..I BKM=9 W:$G(BKMVRCE)]"" BKMVRCE D:$G(BKMVRCE)="" SECT3 Q
 ..I BKM=10 W $S($D(BKMVPOB):$S(BKMVPOB<52:"U.S.A.",1:"OTHER"),1:"UNKNOWN") Q
 ..I BKM=11 ; No data to print for this field
 ..I BKM=12 W $S($D(BKMVCITY):BKMVCITY,1:"") Q
 ..I BKM=13 W $S($D(BKMVCNTY):BKMVCNTY,1:"") Q
 ..I BKM=14 W $S($D(BKMVPST):BKMVPST,1:"") Q
 ..I BKM=15 W $S($D(BKMVPZP):BKMVPZP,1:"") Q
 Q
SECT3 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,3,1,BKM,1)) D
 .I $Y>(IOSL-$P(^BKM(90456,1,2,3,1,BKM,1,0),U,4)-2) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .S BKM1=0 F  S BKM1=$O(^BKM(90456,1,2,3,1,BKM,1,BKM1)) Q:'BKM1  D  Q:BKMX
 ..I $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 ..S BKMLINE1=$P(^BKM(90456,1,2,3,1,BKM,1,BKM1,0),U,1)
 ..W !?1,"  ",BKMLINE1
 Q
SECTIV ;SECTION IV PRINT
 Q:$P(^BKM(90456,1,2,4,0),U,4)'="Y"
 W !!?1,"SECTION IV: ",$P(^BKM(90456,1,2,4,0),U,2),!?1
 F BKM=1:1:5 S BKMLINE=$P(^BKM(90456,1,2,4,1,BKM,0),U,1) D  Q:BKMX
 .I $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .W:$P(^BKM(90456,1,2,4,1,BKM,0),U,2)="Y" !?1,BKMLINE,": "
 .I BKM=1 W $S($D(BKMVLOC):BKMVLOC,1:"") Q
 .I BKM=2 W $S($D(BKMVLCTY):BKMVLCTY,1:"") Q
 .I BKM=3 W $S($D(BKMVLST):BKMVLST,1:"") Q
 .I BKM=4 D SECT4 Q
 .I BKM=5 D SECT4 Q
 Q
SECT4 ;PRINT BLANK DATA FIELDS
 I $D(^BKM(90456,1,2,4,1,BKM,1)) D
 .I $Y>(IOSL-$P(^BKM(90456,1,2,4,1,BKM,1,0),U,4)-2) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 .S BKM1=0 F  S BKM1=$O(^BKM(90456,1,2,4,1,BKM,1,BKM1)) Q:'BKM1  D  Q:BKMX
 ..I $Y>(IOSL-4) D HDR^BKMVSSR3 Q:BKMX  D HDR1^BKMVSSR3
 ..S BKMLINE1=$P(^BKM(90456,1,2,4,1,BKM,1,BKM1,0),U,1)
 ..W !?1,BKMLINE1
 Q