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

ACHSCPTI.m

Go to the documentation of this file.
ACHSCPTI ; IHS/ITSC/TPF/PMF - FOR CHS CPT CODE DETAILED REPORT-HEADER SUBROUTINE ; JUL 10, 2008 
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**14**;JUN 11,2001
 ;3.1*14 12.4.2007 IHS/OIT/FCJ ADDED CSV CHANGES
 ;
 W @IOF
 S ACHSPAGE=ACHSPAGE+1
 S Y=$$HTE^XLFDT($H),ACHSDATP=$P(Y,"@",1),ACHSTIM=$P(Y,"@",2)
 W !,"*",ACHSDATP
 S X=$$LOC^ACHS
 W ?((80/2)-($L(X)/2)),X
 W ?71,ACHSTIM,"*",!,"*User: ",ACHSUSR,?70,"Device:",IO,"*"
 W !!
 S X="CPT CODE Detailed Report - BY VENDOR Page "
 W ?((80/2)-($L(X)/2)),X_ACHSPAGE
 S X="For "_$$FMTE^XLFDT(ACHSBEG)_" To "_$$FMTE^XLFDT(ACHSEND)
 W !?((80/2)-($L(X)/2)),X,!
 W $$REPEAT^XLFSTR("*",80)
 Q
 ;
HEADER1 ;EP
 ;3.1*14 12.4.2007 IHS/OIT/FCJ ADDED CSV CHANGES NXT 4 LINES
 ;S ACHSCODP=$S($D(^ICPT(ACHSCODE,0)):$P($G(^ICPT(ACHSCODE,0)),U,2),1:"NOT ON FILE")
 S ACHSCODP=$S($D(^ICPT(ACHSCODE,0)):$P($$CPT^ICPTCOD(ACHSCODE),U,3),1:"NOT ON FILE")
 ;S ACHSCOD=$S($D(^ICPT(ACHSCODE,0)):$P($G(^ICPT(ACHSCODE,0)),U),1:ACHSCODE)
 S ACHSCOD=$S($D(^ICPT(ACHSCODE,0)):$P($$CPT^ICPTCOD(ACHSCODE),U,2),1:ACHSCODE)
 W !!?5,"CPT Code: ",ACHSCOD_" - "_ACHSCODP
 W !?7,"Vendor: ",$S($D(^AUTTVNDR(ACHSVNDR,0)):$P($G(^AUTTVNDR(ACHSVNDR,0)),U),1:"NOT ON FILE")
 W !?15,ACHSVADD,!?15,ACHSVCIT," ",?25,ACHSVST," ",?35,ACHSZIP
 W !!,"# DOC #",?12,"SERV",?17,"DOS FROM-DOS TO",?35,"UNITS",?41,"MSG",?45,"TOOTH",?51,"SURF",?56,"$ CHG BLD $",?68,"$ CHG ALWD $"
 W !,$$REPEAT^XLFSTR("~",80)
 Q
 ;
NODATA ;EP
 D HEADER
 S %=$P($G(^AUTTVNDR(ACHSVNDR,0)),U),%=$P(%,",",2)_" "_$P(%,",",1)
 W !!!,$$C^XBFUNC("NO DATA AVAILABLE FOR "_%_" FOR SPECIFIED DATE RANGE",80),!!!!
 I IOST["C-",'$D(IO("S")) K DIR S DIR(0)="E" D ^DIR K DIR Q:Y=0
 K ^TMP("ACHSCPT",$J,ACHSVNDR,0)
 G END
 ;
NODATA1 ;EP
 K DIR
 D HEADER
 S DIR(0)="E"
 W !!!,"NO DATA AVAILABLE FOR SPECIFIED CRITERIA",!!!!
 I IOST["C-",'$D(IO("S")) D ^DIR G END:Y=0
 K DIR
 K ^TMP("ACHSCPT",$J)
 D:$D(IO("S")) ^%ZISC
 G ^ACHSCPTD:'$D(ZTQUEUED)
END ;EP
 S:$D(ZTQUEUED) ZTREQ="@"
 D ^%ZISC
 K ACHSBEG,ACHSCOD,ACHSCODE,ACHSCODP,ACHSDATP,ACHSEND
 K ACHSFACP,ACHSPAGE,ACHSTIM,ACHSUSR,ACHSVADD,ACHSVCIT,ACHSVNDR
 K ACHSVST,ACHSZIP,I
 Q
 ;