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

APCLSILA.m

Go to the documentation of this file.
APCLSILA ;IHS/CMI/LAB - AGGREGATE ILI REPORT;  ; 31 Mar 2014  8:08 AM
 ;;3.0;IHS PCC REPORTS;**24,25,26,27,29,30**;FEB 05, 1997;Build 27
 ;
MEDS ;EP
 NEW C,X,Y,Z,T,L,M,N
 S T=$O(^ATXAX("B","FLU ANTIVIRAL MEDS",0))
 S C="",X=0 F  S X=$O(^AUPNVMED("AD",APCLVDFN,X)) Q:X'=+X!(C)  S Y=$P($G(^AUPNVMED(X,0)),U) D
 .Q:'Y
 .Q:'$D(^PSDRUG(Y,0))
 .S Z=0
 .S N=$P(^PSDRUG(Y,0),U)
 .I $D(^ATXAX(T,21,"B",Y)) S Z=1
 .I N["OSELTAMIVIR" S Z=1
 .I N["ZANAMIVIR" S Z=1
 .Q:'Z
 .S $P(APCLMEDS(N),U,1)=$P($G(APCLMEDS(N)),U,1)+1
 .;Q:$D(APCLMEDP(N,$P(APCLVREC,U,5)))
 .Q:$D(^XTMP("APCLSILR",APCLJ,APCLH,"APCLMEDP",$P(APCLVREC,U,5),N))
 .S $P(APCLMEDS(N),U,2)=$P($G(APCLMEDS(N)),U,2)+1
 .;S APCLMEDP(N,$P(APCLVREC,U,5))=""
 .S ^XTMP("APCLSILR",APCLJ,APCLH,"APCLMEDP",$P(APCLVREC,U,5),N)=""
 Q
VACAGE ;EP
 ;S H=$$HASVAC^APCLSILI(APCLVDFN)
 S I=$$HASIVAC^APCLSILI(APCLVDFN)
 I 'I Q
 S S2="A"
 S APCLAY=$$AGE^APCLSILU($P(APCLVREC,U,5),1,$$VD^APCLV(APCLVDFN))
 I APCLAY["<"!(APCLAY<5) D  Q
 .S APCLAY=$$AGE^APCLSILU($P(APCLVREC,U,5),2,$$VD^APCLV(APCLVDFN))
 .I APCLAY<6 Q
 .S A=$$AGEGM^APCLSILR(APCLAY)
 .I I S APCLIMMG("I",S2,A)=$G(APCLIMMG("I",S2,A))+1,APCLIMMG("I",S2,"TOTAL")=$G(APCLIMMG("I",S2,"TOTAL"))+1 D
 ..S APCLIMML(APCLLOCN,"I",S2,A)=$G(APCLIMML(APCLLOCN,"I",S2,A))+1,APCLIMML(APCLLOCN,"I",S2,"TOTAL")=$G(APCLIMML(APCLLOCN,"I",S2,"TOTAL"))+1
 ;.I H S APCLIMMG("H",S2,A)=$G(APCLIMMG("H",S2,A))+1,APCLIMMG("H",S2,"TOTAL")=$G(APCLIMMG("H",S2,"TOTAL"))+1 D
 ;..S APCLIMML(APCLLOCN,"H",S2,A)=$G(APCLIMML(APCLLOCN,"H",S2,A))+1,APCLIMML(APCLLOCN,"H",S2,"TOTAL")=$G(APCLIMML(APCLLOCN,"H",S2,"TOTAL"))+1
 S A=$$AGEG^APCLSILR(APCLAY)
 I I S APCLIMMG("I",S2,A)=$G(APCLIMMG("I",S2,A))+1,APCLIMMG("I",S2,"TOTAL")=$G(APCLIMMG("I",S2,"TOTAL"))+1 D
 .S APCLIMML(APCLLOCN,"I",S2,A)=$G(APCLIMML(APCLLOCN,"I",S2,A))+1,APCLIMML(APCLLOCN,"I",S2,"TOTAL")=$G(APCLIMML(APCLLOCN,"I",S2,"TOTAL"))+1
 ;I H S APCLIMMG("H",S2,A)=$G(APCLIMMG("H",S2,A))+1,APCLIMMG("H",S2,"TOTAL")=$G(APCLIMMG("H",S2,"TOTAL"))+1 D
 ;.S APCLIMML(APCLLOCN,"H",S2,A)=$G(APCLIMML(APCLLOCN,"H",S2,A))+1,APCLIMML(APCLLOCN,"H",S2,"TOTAL")=$G(APCLIMML(APCLLOCN,"H",S2,"TOTAL"))+1
 Q