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

ACRFTPA1.m

Go to the documentation of this file.
ACRFTPA1 ;IHS/OIRM/DSD/THL,AEF - ENTER MULTIPLE PARTICIPANTS FOR GROUP TRAINING; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;UTILITY TO MANAGE GROUP TRAINING PARTICIPANTS
EN D EXIT
 D EN1
EXIT K ACR,ACRQUIT,ACROUT,ACRDA,ACRDUZ,ACRJ,ACRTP0,ACRTP,ACRMAX,ACRPAGE,ACRCANX,ACROBJO,ACRCANO,ACRLBDA,ACRCAN,ACROBJ,ACRYRO,ACRMOO,ACRFPO
 K ^TMP("ACRTP",$J)
 Q
EN1 ;
 W !!,"A 350 will now be printed for each of the participants in the selected training."
 S ZTDESC="350'S FOR TRAINING PARTICIPANTS"
 S (ACRRTN,ZTRTN)="LIST^ACRFTPA1"
 D ^ACRFZIS
 Q
LIST ;EP;TO LIST PARTICIPANTS FOR GROUP TRAINING
 S ACRTPO=$P(^ACRDOC(ACRDOCDA,"TRNG"),U,2)
 S ACRYRO=$P(^ACRDOC(ACRDOCDA,"TRNG"),U,7)
 S ACRMOO=$P(^ACRDOC(ACRDOCDA,"TRNG"),U,8)
 S ACRDA=0
 F  S ACRDA=$O(^ACRTPAR("C",ACRDOCDA,ACRDA)) Q:'ACRDA!$D(ACRQUIT)!$D(ACROUT)  D
 .S ACRTP=+$G(^ACRTPAR(ACRDA,0))
 .Q:'ACRTP
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="148030////"_ACRTP
 .D EOD
 .D DIE^ACRFDIC
 .K DXS,DIP
 .S D0=ACRDOCDA
 .D ^ACRPTRG
 .W @IOF
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="148030////"_ACRTPO_";148081////"_ACRYRO_";148082////"_ACRMOO
 D DIE^ACRFDIC
 K ACRTP,ACRYRO,ACRMOO
 Q
EOD ;ENTRY ON DUTY DATE
 I $P(^ACRTPAR(ACRDA,0),U,6) S ACRYR=$P(^(0),U,6),ACRMO=$P(^(0),U,7) G EODX
EOD1 ;EP;
 Q:'$P($G(^ACRAU(+$G(ACRTP),1)),U,14)  S ACREOD=$P(^(1),U,14)
 N ACRYR,ACRMO,X,Y
 S ACRYR=ACREOD\10000+1700
 S ACRMO=+$E(ACREOD,4,5)
 S X=DT\10000+1700
 S Y=+$E(DT,4,5)
 I Y>(ACRMO-1) S ACRMO=Y-ACRMO
 E  D
 .S X=X-1
 .S ACRMO=12-ACRMO+Y
 S ACRYR=X-ACRYR
 S:ACRYR<1 ACRYR=0
EODX S DR=DR_";148081////"_ACRYR_";148082////"_ACRMO
 Q