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

LRARCAM9.m

Go to the documentation of this file.
  1. LRARCAM9 ;DALISC/CKA - ARCHIVED RCS 14-4 REPORT LMIP SUPPLEMENT PAGE PRINT ;5/23/95
  1. ;;5.2;LAB SERVICE;**59**;Aug 31, 1995
  1. ;same as LRCAPAM9 except archived wkld file
  1. EN ;
  1. PRNTSUM ;
  1. S LRMT=0
  1. F S LRMT=$O(^TMP($J,"LMIP",LRMT)) Q:LRMT<1 S LRMTP=$$DTF^LRAFUNC1(LRMT) D Q:$G(LR("Q"))
  1. .W !,"LMIP SUPPLEMENTAL REPORT printed ",LRPRD
  1. .W !,LRHD0
  1. .W ?((132-($L(LRMTP)+$L($P(LRDA,U,2)))\2)),$P(LRDA,U,2)_" "_LRMTP
  1. .S LRPG=LRPG+1 W ?122,"Page ",LRPG,!
  1. .S LRHDR="Supplemental Pathology Laboratory Medicine Service Workload"
  1. .W !!,?(132-$L(LRHDR)\2),LRHDR,!
  1. .W !!,?32,"STD/Rep",?44,"Manual"
  1. .W ?56,"Micro",?68,"Micro",?80,"In-Pat",?92,"Others",!
  1. .W ?58,"In",?69,"Out",?80,"Stats",!
  1. .W $E(LRDSHS,1,132),!
  1. .D PRNTNAM
  1. Q
  1. PRNTNAM ;
  1. N LRRCNT,LRREC,LRLARE
  1. S LRRCNT=0
  1. W !,"Anatomic Pathology Division",!,$E(LRDSHS,1,27),!
  1. S LRLARE=0
  1. F S LRLARE=$O(^TMP($J,"LMIP",LRMT,"AP",LRLARE)) Q:LRLARE="" D
  1. .S LRREC=$G(^TMP($J,"LMIP",LRMT,"AP",LRLARE))
  1. .S LRRCNT=LRRCNT+1
  1. .W LRRCNT,?6,LRLARE
  1. .D PRNTREC
  1. .W !
  1. ;Write AP subtotals
  1. S LRLARE="AP subtotal"
  1. S LRREC=$G(^TMP($J,"LMIP",LRMT,"AP",0))
  1. W ?6,LRLARE
  1. D PRNTREC
  1. ;
  1. W !!,"Clinical Pathology Division",!,$E(LRDSHS,1,27),!
  1. S LRLARE=0
  1. F S LRLARE=$O(^TMP($J,"LMIP",LRMT,"CP",LRLARE)) Q:LRLARE="" D
  1. .S LRREC=$G(^TMP($J,"LMIP",LRMT,"CP",LRLARE))
  1. .S LRRCNT=LRRCNT+1
  1. .W LRRCNT,?6,LRLARE
  1. .D PRNTREC
  1. .W !
  1. ;Write CP subtotals
  1. S LRLARE="CP subtotal"
  1. S LRREC=$G(^TMP($J,"LMIP",LRMT,"CP",0))
  1. W ?6,LRLARE
  1. D PRNTREC
  1. ;Write grand totals
  1. W !
  1. W $E(LRDSHS,1,132),!
  1. S LRRCNT=LRRCNT+1,LRLARE="GRAND TOTAL"
  1. D EDIT1
  1. S LRREC=$G(^TMP($J,"LMIP",LRMT,"TOT-AP/CP"))
  1. W ?6,LRLARE
  1. D PRNTREC
  1. I $E(IOST,1,2)="C-",'$G(LR("Q")) D M^LRU Q:$G(LR("Q"))
  1. W @IOF
  1. Q
  1. PRNTREC ;
  1. W ?31,$J($P(LRREC,U,12),7),?43,$J($P(LRREC,U,13),7)
  1. W ?55,$J($P(LRREC,U,14),7),?67,$J($P(LRREC,U,15),7)
  1. W ?79,$J($P(LRREC,U,16),7),?91,$J($P(LRREC,U,17),7)
  1. Q
  1. EDIT1 ;
  1. N I,LRAPSUB,LRCAPSUB,LRGTOT
  1. S LRAPSUB=$G(^TMP($J,"LMIP",LRMT,"AP",0))
  1. S LRCPSUB=$G(^TMP($J,"LMIP",LRMT,"CP",0))
  1. F I=12:1:17 D
  1. . S LRGTOT=$P(LRAPSUB,U,I)+$P(LRCPSUB,U,I)
  1. . S $P(^TMP($J,"LMIP",LRMT,"TOT-AP/CP"),U,I)=LRGTOT
  1. Q