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

APCLW12.m

Go to the documentation of this file.
APCLW12 ; IHS/CMI/LAB - CONT. APCLW1 ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
 ;
SETE ;EP - set for each age
 F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL USABLE PATS",S,APCLAGE)=^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL USABLE PATS",S,APCLAGE)+1 S X="APCL"_S_"TUP" S @X=@X+1
 F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL BMI",S,APCLAGE)=^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL BMI",S,APCLAGE)+APCLBMI S X="APCL"_S_"BMI" S @X=@X+APCLBMI
 I APCLBMI'<$P(^APCLBMI(APCLREF,0),U,5) D  G SETE1
 .F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"OBESE",S,APCLAGE)=^XTMP("APCLW1",APCLJOB,APCLBTH,"OBESE",S,APCLAGE)+1 S X="APCL"_S_"OBE" S @X=@X+1
 .Q
 I APCLBMI'<$P(^APCLBMI(APCLREF,0),U,4) F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"OVERWEIGHT",S,APCLAGE)=^XTMP("APCLW1",APCLJOB,APCLBTH,"OVERWEIGHT",S,APCLAGE)+1 S X="APCL"_S_"OVR" S @X=@X+1
SETE1 I APCLBMI<^XTMP("APCLW1",APCLJOB,APCLBTH,"LOW",AUPNSEX,APCLAGE) F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"LOW",S,APCLAGE)=APCLBMI
 I APCLBMI<APCLBLOW S APCLBLOW=APCLBMI
 S X="APCL"_AUPNSEX_"LOW" I APCLBMI<@X S @X=APCLBMI
 I APCLBMI>APCLBHGH S APCLBHGH=APCLBMI
 I APCLBMI>^XTMP("APCLW1",APCLJOB,APCLBTH,"HIGH",AUPNSEX,APCLAGE) F S=AUPNSEX,"B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"HIGH",S,APCLAGE)=APCLBMI
 S X="APCL"_AUPNSEX_"HGH" I APCLBMI>@X S @X=APCLBMI
 Q
SETG ;EP
 F I=1:1 S APCLNN=$P(APCLBIN,";",I) Q:APCLNN=""  S APCLX=$P(APCLNN,"-"),APCLY=$P(APCLNN,"-",2) I APCLAGE'<APCLX,APCLAGE'>APCLY  S APCLAGE=I
 D SETE
 Q
SETGROUP ;EP
 S APCLNN=APCLBIN,APCLA="" F I=1:1 S APCLX=$P(APCLNN,";",I) Q:APCLX=""  D SETA
 Q
SETA ;
 F J="M","F","B" S ^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL USABLE PATS",J,I)=0,^XTMP("APCLW1",APCLJOB,APCLBTH,"LOW",J,I)=999999,^XTMP("APCLW1",APCLJOB,APCLBTH,"HIGH",J,I)=0,^XTMP("APCLW1",APCLJOB,APCLBTH,"TOTAL BMI",J,I)=0 D
 .S ^XTMP("APCLW1",APCLJOB,APCLBTH,"OBESE",J,I)=0,^XTMP("APCLW1",APCLJOB,APCLBTH,"OVERWEIGHT",J,I)=0
 Q
 ;