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

QAOSPSS2.m

Go to the documentation of this file.
QAOSPSS2 ;HISC/DAD-OCCURRENCE SERVICE STATISTICS BY CRITERIA ;9/14/92  10:58
 ;;3.0;Occurrence Screen;;09/14/1993
 S QAOSQUIT=0,QAOSPAGE=1,X="T",%DT="" D ^%DT X ^DD("DD") S TODAY=Y K UNDL S $P(UNDL,"-",81)=""
 F QAOSTYPE="N","L","1" Q:QAOSQUIT  I $O(^UTILITY($J,"QAOSPSS",QAOSTYPE,0)) S COLTOT="0^0^0^0^0^0^0^0^0^0^0^0^0" D HEAD F QAOSSEQ=0:0 S QAOSSEQ=$O(^UTILITY($J,"QAOSPSS",QAOSTYPE,QAOSSEQ)) Q:QAOSSEQ'>0!QAOSQUIT  D LOOP1
 Q
LOOP1 ;
 S TAB=15,ROWTOT=0,QAOSTEMP=^UTILITY($J,"QAOSPSS",QAOSTYPE,QAOSSEQ) W !!,$J(QAOSSEQ,3),?6,$P(QAOSTEMP,"^")
 F QA=2:1:$L(QAOSTEMP,"^") S X=$P(QAOSTEMP,"^",QA),ROWTOT=ROWTOT+X W ?TAB,$J(X,3) S TAB=TAB+5,$P(COLTOT,"^",QA-1)=$P(COLTOT,"^",QA-1)+X
 W ?TAB,$J(ROWTOT,5) S $P(COLTOT,"^",13)=$P(COLTOT,"^",13)+ROWTOT
 S FLG=$O(^UTILITY($J,"QAOSPSS",QAOSTYPE,QAOSSEQ))
 I FLG'>0 D COLTOT,PAUSE:$E(IOST)="C" Q
 I $Y>(IOSL-6) D:$E(IOST)="C" PAUSE Q:QAOSQUIT  D:FLG HEAD
 Q
COLTOT ;
 W !!,UNDL,!,"TOTAL" S TAB=14 F QA=1:1:$L(COLTOT,"^")-1 S X=$P(COLTOT,"^",QA) W ?TAB,$J(X,4) S TAB=TAB+5
 W ?75,$J($P(COLTOT,"^",13),5)
 Q
PAUSE ;
 K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0)
 Q
 W:(QAOSPAGE>1)!($E(IOST)="C") @IOF
 W !!?22,"OCCURRENCE SCREEN SERVICE STATISTICS",?68,TODAY
 W !?QAQTART,QAQ2HED,?68,"PAGE: ",QAOSPAGE S QAOSPAGE=QAOSPAGE+1
 W !!,"CRITERIA",?14,"BLIND",?21,"DOM",?28,"MEDICINE",?40,"NHCU",?45,"NON",?50,"PSYCH",?61,"SCI",?69,"UNKNOWN"
 W !?3,"SCREEN",?14,"REHAB",?23,"INTERMED",?33,"NEUROLOGY",?45,"COUNT",?53,"REHAB-MED",?64,"SURGERY",?75,"TOTAL",!,UNDL
 Q