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

BLRLUAC6.m

Go to the documentation of this file.
BLRLUAC6 ; IHS/OIT/MKK - IHS LRUPAC 6, file 61 report ; [ 05/15/11  7:50 AM ]
 ;;5.2;IHS LABORATORY;**1030**;NOV 01, 1997
 ;;
 ;; Emulates the Lab accession and test counts Report, Part 3
 ;;
F61REPT ; EP - File 61 (Topography File) REPorT
 NEW LRLDT,LRSDT,SELRAAAB,XTMPNODE
 NEW F61GTOT,SPECTYPE,SPECNAME
 NEW BLRVERN,HEADER,LINES,MAXLINES,PG,QFLG,HEDONE
 ;
 Q:$$F61INITV()="Q"
 ;
 S (F61GTOT,SPECTYPE)=0
 F  S SPECTYPE=$O(^BLRLUPAC(DATETIME,"SPECSORT",SPECTYPE))  Q:SPECTYPE<1!(QFLG="Q")  D
 . I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,HEDONE)  Q:QFLG="Q"
 . ;
 . S SPECNAME=$P($G(^LAB(61,SPECTYPE,0)),"^")
 . W ?4,SPECTYPE
 . W ?14,SPECNAME
 . W ?64,$J($FN(+$G(^BLRLUPAC(DATETIME,"SPECSORT",SPECTYPE)),","),11)
 . W !
 . S LINES=LINES+1
 . S F61GTOT=F61GTOT+$G(^BLRLUPAC(DATETIME,"SPECSORT",SPECTYPE))
 ;
 D TOTALS^BLRLUAC2(F61GTOT)
 ;
 D ^%ZISC
 ;
 Q:QFLG="Q"
 ;
 D PRESSKEY^BLRGMENU(9)
 ;
 Q
 ;
F61INITV() ; EP - File 61 report's INITialization of Variables
 D SETXTMPN^BLRLUAC1(.XTMPNODE)     ; Set the ^TMP node
 S BLRVERN=$P($P($T(+1),";")," ")
 ;
 NEW DATERNGE,BADMSG,STR
 ;
 S BADMSG="No Topography Data Found."
 Q:$$GETXTMPV^BLRLUAC2("SPECSORT",.SELRAAAB,.LRSDT,.LRLDT,BADMSG)="Q" "Q"
 ;
 S DATERNGE="Date Range: "_$$FMTE^XLFDT(LRSDT,"5DZ")
 S DATERNGE=DATERNGE_" thru "_$$FMTE^XLFDT(LRLDT,"5DZ")
 ;
 K HEADER
 S HEADER(1)="Lab Accession and Test Counts"
 S HEADER(2)=SELRAAAB_" Accession Area Counts Only"
 S HEADER(3)=$$CJ^XLFSTR("Topography File (# 61) Report",IOM)
 S HEADER(4)=$$CJ^XLFSTR(DATERNGE,IOM)
 ;
 S MAXLINES=21,LINES=MAXLINES+10,PG=0,(QFLG,HEDONE)="NO"
 ;
 S HEADER(5)=" "
 S $E(HEADER(6),5)="IEN"
 S $E(HEADER(6),15)="Description"
 S $E(HEADER(6),65)=$J("Count",11)
 ;
 D OPENIO^BLRLUAC9(.MAXLINES,.LINES)
 ;
 I IOST["C-VT" D HEADONE2^BLRLUAC2(.HEDONE)  W !
 ;
 Q "OK"