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