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

BLRLUAC5.m

Go to the documentation of this file.
BLRLUAC5 ; IHS/OIT/MKK - IHS LRUPAC 5, file 60 report ; [ 05/15/11  7:50 AM ]
 ;;5.2;IHS LABORATORY;**1030**;NOV 01, 1997
 ;;
 ;; Emulates the Lab accession and test counts Report, Part 5
 ;;
F60SREPT ; EP - File 60 (Laboratory Test) Sorted Report
 NEW LRLDT,LRSDT,SELRAAAB,XTMPNODE
 NEW F60GTOT,LAB60IEN,L60DESC
 NEW BLRVERN,HEADER,LINES,MAXLINES,PG,QFLG,HEDONE
 ;
 Q:$$F60INITV()="Q"
 ;
 F  S LAB60IEN=$O(^BLRLUPAC(DATETIME,"TESTSORT",LAB60IEN))  Q:LAB60IEN<1!(QFLG="Q")  D
 . I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,HEDONE)  Q:QFLG="Q"
 . ;
 . S L60DESC=$$TRIM^XLFSTR($P($G(^LAB(60,LAB60IEN,0)),"^"),"LR"," ")
 . W ?4,LAB60IEN
 . W ?14,L60DESC
 . W ?64,$J($FN($G(^BLRLUPAC(DATETIME,"TESTSORT",LAB60IEN)),","),11)
 . W !
 . S LINES=LINES+1
 . S F60GTOT=F60GTOT+$G(^BLRLUPAC(DATETIME,"TESTSORT",LAB60IEN))
 ;
 D TOTALS^BLRLUAC2(F60GTOT)
 D CLOSEIO^BLRLUAC9
 ;
 Q:QFLG="Q"
 D PRESSKEY^BLRGMENU(9)
 ;
 Q
 ;
F60INITV() ; EP - File 60 report INITialization of Variables
 D SETXTMPN^BLRLUAC1(.XTMPNODE)     ; Set the ^TMP node
 S BLRVERN=$P($P($T(+1),";")," ")
 ;
 NEW DATERNGE,BADMSG,STR
 ;
 S BADMSG="No Laboratory Test File Data Found."
 Q:$$GETXTMPV^BLRLUAC2("TESTSORT",.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("Laboratory Test File (# 60) Sort",IOM)
 S HEADER(4)=$$CJ^XLFSTR(DATERNGE,IOM)
 ;
 S MAXLINES=21,LINES=MAXLINES+10,PG=0,(HEDONE,QFLG)="NO"
 ;
 S HEADER(5)=" "
 S $E(HEADER(6),5)="IEN"
 S $E(HEADER(6),15)="Description"
 S $E(HEADER(6),65)=$J("Count",11)
 ;
 S (F60GTOT,LAB60IEN)=0
 ;
 D OPENIO^BLRLUAC9(.MAXLINES,.LINES)
 ;
 I IOST["C-VT" D HEADONE2^BLRLUAC2(.HEDONE)  W !
 ;
 Q "OK"
 ;
F44REPT ; EP - Location File Counts
 NEW LRLDT,LRSDT,SELRAAAB,XTMPNODE
 NEW F44GTOT,LAB44IEN,L44DESC
 NEW BLRVERN,HEADER,LINES,MAXLINES,PG,QFLG,HEDONE
 ;
 Q:$$F44INITV()="Q"
 ;
 F  S LAB44IEN=$O(^BLRLUPAC(DATETIME,"LOCSORT",LAB44IEN))  Q:LAB44IEN<1!(QFLG="Q")  D
 . I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,HEDONE)  Q:QFLG="Q"
 . ;
 . S L44DESC=$$TRIM^XLFSTR($P($G(^SC(LAB44IEN,0)),"^"),"LR"," ")
 . W ?4,LAB44IEN
 . W ?14,L44DESC
 . W ?64,$J($FN($G(^BLRLUPAC(DATETIME,"LOCSORT",LAB44IEN)),","),11)
 . W !
 . S LINES=LINES+1
 . S F44GTOT=F44GTOT+$G(^BLRLUPAC(DATETIME,"LOCSORT",LAB44IEN))
 ;
 D TOTALS^BLRLUAC2(F44GTOT)
 D CLOSEIO^BLRLUAC9
 ;
 Q:QFLG="Q"
 D PRESSKEY^BLRGMENU(9)
 ;
 Q
 ;
F44INITV() ; EP - File 44 report INITialization of Variables
 D SETXTMPN^BLRLUAC1(.XTMPNODE)     ; Set the ^TMP node
 S BLRVERN=$P($P($T(+1),";")," ")
 ;
 NEW DATERNGE,BADMSG,STR
 ;
 S BADMSG="No Hospital Location File Data Found."
 Q:$$GETXTMPV^BLRLUAC2("LOCSORT",.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("Hospital Location File (# 44) Sort",IOM)
 S HEADER(4)=$$CJ^XLFSTR(DATERNGE,IOM)
 ;
 S MAXLINES=22,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)
 ;
 S (F44GTOT,LAB44IEN)=0
 ;
 D OPENIO^BLRLUAC9(.MAXLINES,.LINES)
 ;
 I IOST["C-VT" D HEADONE2^BLRLUAC2(.HEDONE)  W !
 ;
 Q "OK"