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

BKMQSSR3.m

Go to the documentation of this file.
BKMQSSR3 ;PRXM/HC/CLT - STATE SURV. REPORT PRINT ; 31 Mar 2005  3:51 PM
 ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
 ;
 ;
EN ;EP - MAIN ROUTINE ENTRY POINT
 S BKMHDR=$P(^BKM(90456,1,0),U,1),BKMHDR1=$P(^BKM(90456,1,0),U,2)
 S BKMPAD=80-$L(BKMHDR)\2
 F BKM=1:1:BKMPAD-2 S BKMHDR="*"_BKMHDR
 F BKM=1:1:BKMPAD-2 S BKMHDR=BKMHDR_"*"
 I BKMHDR1'="" S BKMHDR1="********** "_BKMHDR1_" **********"
 S BKMVNDT=$$FMTE^XLFDT($$DT^XLFDT(),"5Z")
 S PAGE=0,BKMX=0
 D HDR
 D HDR1,HDR2,UPD^BKMQUTL(""),SUBHEAD
 D SECTIONI,UPD^BKMQUTL($C(12),,1)
 Q
SUBHEAD ;PAGE 1 SUBHEADER
 S BKMLINE=0
 F  S BKMLINE=$O(^BKM(90456,1,1,BKMLINE)) Q:'BKMLINE  S X=^BKM(90456,1,1,BKMLINE,0) D UPD^BKMQUTL("    "_X) ; D ^DIWP ;D:$Y>(IOSL-2) HDR^BKMQSSR3 ;Q:BKMX
 Q
HDR ;EP - REPORT MAIN HEADER
 S PAGE=PAGE+1
 N LINE
 D UPD^BKMQUTL($$LINE^BKMQUTL(" "_BKMVNDT,"Page "_PAGE,70))
 Q
HDR1 ;EP - PAGE 1 HEADER
 D CTR^BKMQUTL(BKMHDR)
 Q
HDR2 ;PAGE 1 ADDITIONAL LINE
 Q:BKMHDR1=""
 D CTR^BKMQUTL(BKMHDR1)
 Q
SECTIONI ;SECTION I PRINT
 S BKMLINE=$P(^BKM(90456,1,2,1,0),U,2),BKMLINE1=$P(^BKM(90456,1,2,1,0),U,3),BKMSEC=$P(^BKM(90456,1,2,1,0),U,1)
 Q:$P(^BKM(90456,1,2,1,0),U,4)'="Y"
 D UPD^BKMQUTL("",1),UPD^BKMQUTL("SECTION I: "_BKMLINE)
 D UPD^BKMQUTL($$LINE^BKMQUTL("",BKMLINE1,11),1)
 F BKM=1:1:9 D
 .S BKMLINE=$P(^BKM(90456,1,2,1,1,BKM,0),U,1),BKMLINE1=$P($G(^BKM(90456,1,2,1,1,BKM,1,1,0)),U,1)
 .D LPRINT
 Q
LPRINT ;PRINT A LINE WITH DATA
 N LINE
 S LINE=" "_BKMLINE
 I BKMLINE1'="" S LINE=LINE_" "_BKMLINE1
 S LINE=LINE_": "
 I BKM=1 S LINE=LINE_$S($G(DFN)]"":$$GET1^DIQ(2,DFN,.01,"E"),1:"")
 I BKM=2 S LINE=LINE_$S($D(BKMVPHN):BKMVPHN,1:"")
 I BKM=3 S LINE=LINE_$S($D(BKMVADDL):BKMVADDL,1:"")
 I BKM=4 S LINE=LINE_$S($D(BKMVHRN):BKMVHRN,1:"")
 I BKM=5 S LINE=LINE_$S($D(BKMPROV):BKMPROV,1:"")
 I BKM=6 S LINE=LINE_$S($D(BKMVPPH):BKMVPPH,1:"")
 I BKM=7 S LINE=LINE_$S($D(BKMVLOC):BKMVLOC,1:"")
 I BKM=8 ; No data to print for this field currently
 I BKM=9 ; No data to print for this field currently
 D UPD^BKMQUTL(LINE)
 Q