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

AGSAMPP.m

Go to the documentation of this file.
AGSAMPP ; IHS/ASDS/EFG - PRINT LIST OF SAMPLED PATIENTS ;  
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 G NOSAMP:'$D(^AGSAMPLE(0)),NOSAMP:'$O(^AGSAMPLE(0))
 W @IOF,?20,"***   PRINT LIST OF SAMPLED PATIENTS FOR   ***",!!
 S AGV("SITNUM")=^AGSAMPLE(0),AGV("SITNM")=$P(^DIC(4,AGV("SITNUM"),0),U)
 W ?80-$L(AGV("SITNM"))/2,AGV("SITNM"),!!
 S %ZIS="P" D ^%ZIS I POP S IOP=ION D ^%ZIS G END
 S (R,AGPGPG)=0,AGV("SDIG")="" U IO D HEADER
A3 S R=$O(^AGSAMPLE(R)) G END:R=""
 S AGRR=0
A4 S AGRR=$O(^AGSAMPLE(R,AGRR)) G A3:AGRR=""
 S X=^AGSAMPLE(R,AGRR),AGV("TDIG")=$P(X,U),AGHRN=$P(X,U,2),AGNAME=$P(X,U,3)
 I AGV("TDIG")'=AGV("SDIG") W !
 W !,$J(AGV("TDIG"),5),?10,$J(AGHRN,6),?20,AGNAME
 S AGV("SDIG")=AGV("TDIG")
 I $Y>55 D HEADER
 G A4
END D ^%ZISC
 K AGHRN,I,AGNAME,AGPGPG,R,AGRR,AGV("SDIG"),AGV("SITNM"),AGV("SITNUM"),AGV("TDIG"),X,Y
 Q
 W !?5,"SAMPLE CHARTS FOR REGISTRATION STUDY   pg ",$J(AGPGPG,3),!?50-$L(AGV("SITNM"))/2,AGV("SITNM"),! F I=1:1:50 W "-"
 W !,"T-DIGIT",?10,"CHART #",?20,"PATIENT NAME" W ! F I=1:1:50 W "*"
 W !!
 Q
NOSAMP W *7,!!,"Sampling does not exist.",!!,"Generate first.",!!,"Press RETURN..." R X:DTIME
 Q