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

ACHSTXTT.m

Go to the documentation of this file.
ACHSTXTT ; IHS/ITSC/TPF/PMF - TRANSFER ACHSDATA GLOBAL TO EXPORT MEDIA ; 
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**25**;JUN 11, 2001;Build 43
 ;
 D LINES^ACHSFU,^ACHSVAR
L1 ;
 W @IOF,!,ACHS("*"),!,"*",?23,"COPY CHS TX DATA FOR EXPORT",?78,"*",!,ACHS("*"),!
 I '$D(^ACHSDATA(0)) W !?25,"CHS EXPORT RECORDS NOT FOUND" G END
L2 ;
 W !?10,"CHS EXPORT DATA FOUND FOR : ",$P(^ACHSDATA(0),U,2)
 W !!?25,"EXPORT RUN DATE",?50,"=",?55,$$FMTE^XLFDT($P(^ACHSDATA(0),U,3))
 W !?25,"BEGINNING ADD/UPD DATE",?50,"=",?55,$$FMTE^XLFDT($P(^ACHSDATA(0),U,4))
 W !?25,"ENDING ADD/UPD DATE",?50,"=",?55,$$FMTE^XLFDT($P(^ACHSDATA(0),U,5))
 W !?25,"NUMB OF DATA RECORDS",?50,"=",?55,$P(^ACHSDATA(0),U,7)
 I '$D(^ACHSTXST("C",$P(^ACHSDATA(0),U,3),DUZ(2))) W !!,"CHS TX DATA DOES NOT MATCH LAST EXPORT DATE & FACILITY",*7 G END
 S DA=$P(^ACHSTXST(DUZ(2),1,0),U,3)
 I '$D(^ACHSTXST(DUZ(2),1,DA,0)) W !!,"CHS TX STATUS NODE FOR THIS SITE IS MISSING",*7 G END
 I $P(^ACHSTXST(DUZ(2),1,DA,0),U,10)="N" W !,*7,?27,"RECOPYING EXPORT DATA TO DATA MEDIA"
L3 ;
 S ACHSMDAT=$$DTAO^ACHSTX
 G END:$D(DUOUT)!$D(DTOUT)
 S %=$$DIR^XBDIR("Y","ARE ALL ENTRIES CORRECT (Y/N)")
 G END:$D(DTOUT)!$D(DUOUT),L1:'%
 S $P(^ACHSDATA(0),U,9)=ACHSMDAT,$P(^ACHSDATA(0),U,8)=""
L5 ;
 S XBGL="ACHSDATA",XBNAR="CONTRACT HEALTH export data"
 S XBMED="F"    ;ACHS*3.1*25
 I $P(^AUTTSITE(1,0),U,14)'="",$D(^%ZIB(9888888.93,"B",$P(^AUTTSITE(1,0),U,14))) S XBS1=$P(^AUTTSITE(1,0),U,14) ;ACHS*3.1*25
 D ^XBGSAVE
 I XBFLG G END
 S $P(^ACHSTXST(DUZ(2),1,DA,0),U,10)="Y",$P(^(0),U,7)=ACHSMDAT,$P(^ACHSTXST(DUZ(2),1,DA,0),U,6)=""
 W !!,"NORMAL END OF JOB"
END ; Show results, ask EOP, kill vars, quit.
 I $D(XBFLG),XBFLG W !!,XBFLG(1),!!
 I $$DIR^XBDIR("E","Press RETURN...")
 K %DT,ACHS,XBOK,ACHSMDAT,DA,DIR
 Q
 ;