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

ACHSYCN.m

Go to the documentation of this file.
ACHSYCN ; IHS/ITSC/PMF - RETRANSMIT BY TRANS CODE AND DATE ;    [ 10/16/2001   8:16 AM ]
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
 ;
 ;formally named ACHSZZ01
 ;
 D INIT
 S IEN=0
 F  S IEN=$O(^ACHS(2,IEN)) Q:'IEN  D  ; LOOP THROUGH CANS
 . S D=$G(^ACHS(2,IEN,0)) ; THE WHOLE THING
 . S CAN=$P(D,U,1) ; GET THE CAN
 . I "DQG"[$E(CAN,5) D SET ; WE HAVE A 1998,1999 OR 2000 CAN
 QUIT
INIT ; SET UP THE IMPORTANT VARIABLES
 S U="^"
 D ^XBKVAR ; DUZ AND OTHER STUFF
 QUIT
SET ;
 S C=$E(CAN,5) ; THE YEAR CODE
 S X=$S(C="Q":1998,C="D":1999,C="G":2000,1:0)
 I X=0 Q  ; DON'T KNOW WHAT HAPPENED BUT THIS IS BAD
 W !,CAN," = ",X
 S DLAYGO=9002062
 S DIC(0)="L" ; LAYGO A FISCAL YEAR
 S DIC="^ACHS(2,"_IEN_",1," ; ROOT REF TO SUB FILE FOR FISCAL YEAR
 S DA(1)=IEN ; THIS MUST BE SET FOR FILEMAN TO WORK
 S DIC("P")=$P(^DD(DLAYGO,4,0),U,2) ; FOR SUBFILE SETUP TO WORK
 D ^DIC ; LOOK AND SEE IF WE ALREADY HAVE THIS ENTRY
 W " ... FY ",$S($P(Y,U,3):"SET",1:"EXISTS")
 QUIT