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

BKMQSSR5.m

Go to the documentation of this file.
BKMQSSR5 ;PRXM/HC/CLT - STATE SURV. REPORT PRINT CONTINUED ; 31 Mar 2005  3:52 PM
 ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
 ;
 ;
EN ;EP - PRIMARY ROUTINE ENTRY POINT
 D UPD^BKMQUTL("")
 D SECTV
 D UPD^BKMQUTL("")
 D SECTVI
 Q
SECTV ;SECTION V PRINT
 Q:$P(^BKM(90456,1,2,5,0),U,4)'="Y"
 D UPD^BKMQUTL(" SECTION V: "_$P(^BKM(90456,1,2,5,0),U,2)),UPD^BKMQUTL("")
 F BKM=2,1 S BKMLINE=$P(^BKM(90456,1,2,5,1,BKM,0),U,1) D
 . D:$P(^BKM(90456,1,2,5,1,BKM,0),U,2)="Y" UPD^BKMQUTL(" "_BKMLINE) D
 .. I BKM=1 D SECT5 Q
 .. I BKM=2 D:$G(BKMVETO)]""  Q
 ... D UPD^BKMQUTL($$LINE^BKMQUTL("",BKMVETO,5))
 Q
SECT5 ;SECTION 5 WORD PROCESSING FIELDS
 I $D(^BKM(90456,1,2,5,1,BKM,1)) D
 . S BKM1=0
 . F  S BKM1=$O(^BKM(90456,1,2,5,1,BKM,1,BKM1)) Q:'BKM1  D
 .. S BKMLINE1=$P(^BKM(90456,1,2,5,1,BKM,1,BKM1,0),U,1)
 .. D UPD^BKMQUTL(" "_BKMLINE1)
 Q
SECTVI ;SECTION VI PRINT
 Q:$P(^BKM(90456,1,2,6,0),U,4)'="Y"
 N LINE
 D UPD^BKMQUTL(" SECTION VI: "_$P(^BKM(90456,1,2,6,0),U,2))
 D UPD^BKMQUTL(" "_$P(^BKM(90456,1,2,6,0),U,3),1)
 S BKM0=""
 F  S BKM0=$O(BKMVLABS(BKM0),-1) Q:BKM0=""  D
 . S BKMDT=$$FMTE^XLFDT(BKM0\1,"5Z")
 . S BKM1=""
 . F  S BKM1=$O(BKMVLABS(BKM0,BKM1)) Q:BKM1=""  D
 .. S BKM2=""
 .. F  S BKM2=$O(BKMVLABS(BKM0,BKM1,BKM2)) Q:BKM2=""  D
 ... I BKM2="LAB" S BKMVLN=$$GET1^DIQ(9000010.09,BKM1,.01,"E")
 ... I BKM2="CPT" S BKMIEN=$$GET1^DIQ(9000010.18,BKM1,.01,"I") D
 .... I $T(CPT^ICPTCOD)'="" S BKMVLN=$$ICPT^BKMUL3(BKMIEN,BKM0\1,3) Q  ;csv
 .... S BKMVLN=$$GET1^DIQ(81,BKMIEN,2,"E")
 ... S LINE=$$LINE^BKMQUTL("",$E(BKMVLN,1,30),5),LINE=$$LINE^BKMQUTL(LINE,BKMDT,40)
 ... S LINE=$$LINE^BKMQUTL(LINE,BKMVLABS(BKM0,BKM1,BKM2),55)
 ... D UPD^BKMQUTL(LINE)
 F BKM=1:1:6 S BKMLINE=$P(^BKM(90456,1,2,6,1,BKM,0),U,1) D
 . D:$P(^BKM(90456,1,2,6,1,BKM,0),U,2)="Y" UPD^BKMQUTL(BKMLINE)
 . D SECT6
 Q
SECT6 ;SECTION 6 WORD PROCESSING FIELDS
 I $D(^BKM(90456,1,2,6,1,BKM,1)) D
 . S BKM1=0
 . F  S BKM1=$O(^BKM(90456,1,2,6,1,BKM,1,BKM1)) Q:'BKM1  D
 .. S BKMLINE1=$P(^BKM(90456,1,2,6,1,BKM,1,BKM1,0),U,1)
 .. D UPD^BKMQUTL(" "_BKMLINE1)
 Q