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

APCLOSP6.m

Go to the documentation of this file.
APCLOSP6 ; IHS/CMI/LAB - INHOSP PRINT ;
 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
 ;
POV ;
 I $Y>(IOSL-15) D HEAD^APCLOSP Q:$D(APCLQUIT)
 S APCL1="INHOSPPOV",APCL2="INHOSPPOVC",APCLMAX=10,APCLGLOB="^ICD9(",APCLPIEC=3
 W !!,"The ten leading purposes of In-Hospital visits by individual ICD Code ",!,"are listed below.  Both primary and secondary diagnoses are included in the counts.",!
 W !?11,"By ICD Diagnosis"
 D PROC
APC ;
 Q  ;no more 1/6/2002
 I $Y>(IOSL-12) D HEAD^APCLOSP Q:$D(APCLQUIT)
 S APCL1="INHOSPAPC",APCL2="INHOSPAPCC",APCLMAX=10,APCLGLOB="^AUTTRCD(",APCLPIEC=3
 W !!?11,"By APC Code"
 D PROC
 Q
PROC S (APCLC,APCLN)=0 F  S APCLN=$O(^XTMP("APCLOS",APCLJOB,APCLBTH,APCL2,APCLN)) Q:APCLN=""!(APCLC=APCLMAX)  D PROC1
 Q
PROC1 ;
 S APCLD=0 F  S APCLD=$O(^XTMP("APCLOS",APCLJOB,APCLBTH,APCL2,APCLN,APCLD)) Q:APCLD=""!(APCLC=APCLMAX)  D PROC2
 Q
PROC2 ;
 S APCLC=APCLC+1
 S X=^XTMP("APCLOS",APCLJOB,APCLBTH,APCL2,APCLN,APCLD)
 S APCLPD=0 F  S APCLPD=$O(^XTMP("APCLOSP",APCLJOB,APCLBTH,APCL1,APCLPD)) Q:APCLD=APCLPD!(APCLPD="")
 S Y=$S(APCLPD]"":^XTMP("APCLOSP",APCLJOB,APCLBTH,APCL1,APCLPD),1:0) D CALC^APCLOSUT
 S G=APCLGLOB_APCLD_")"
 W !?5,APCLC,").  ",?10,$E($P($$ICDDX^ICDEX(APCLD),U,4),1,40),?45,$J(X,7),?56,"(",Z,")"
 Q