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

APCLCART.m

Go to the documentation of this file.
APCLCART ; IHS/CMI/LAB - SET UP TAX CALIF ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
 ;
 ;
POST ;EP
 F APCLN=60:1:70,74,80:1:90,94 S APCLTEXT="L"_APCLN D SETTAX
 Q
PCPT ;EP - called from apclcarp
 D HEADER
 Q:APCLQUIT
 S APCLV=0 F  S APCLV=$O(^XTMP("APCLCAR",APCLJ,APCLH,"NO CPT LIST",APCLV)) Q:APCLV'=+APCLV!(APCLQUIT)  D
 .I $Y>(IOSL-3) D HEADER Q:APCLQUIT
 .S P=$P(^AUPNVSIT(APCLV,0),U,5)
 .I P W !,$P(^DPT(P,0),U),?32,$$HRN^AUPNPAT(P,DUZ(2))
 .W ?39,$$VAL^XBDIQ1(9000010,APCLV,.01),?60,$E($$VAL^XBDIQ1(9000010,APCLV,.06),1,18)
 .Q
 Q
 G:'APCLPG HEADER1
 K DIR I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S APCLQUIT=1 Q
HEADER1 ;
 W:$D(IOF) @IOF S APCLPG=APCLPG+1
 W !?3,$P(^VA(200,DUZ,0),U,2),?35,$$FMTE^XLFDT(DT),?70,"Page ",APCLPG,!
 W !,$$CTR("***  CALIFORNIA ANNUAL UTILIZATION REPORT OF PRIMARY CARE CLINICS  ***",80),!
 W !,$$CTR("*** 2008 VERSION ***",80),!
 ;W $$CTR($P(^DIC(4,DUZ(2),0),U)),!
 I '$D(APCLLOCT) S X="ALL LOCATIONS OF ENCOUNTER SELECTED" W $$CTR(X,80),!
 I $D(APCLLOCT) D
 .S X="Locations Selected:"
 .S Y=0 F  S Y=$O(APCLLOCT(Y)) Q:Y'=+Y  S X=X_"  "_$P(^DIC(4,Y,0),U)
 .W X,!
 S X="Reporting Period: "_$$FMTE^XLFDT(APCLBD)_" to "_$$FMTE^XLFDT(APCLED) W $$CTR(X,80),!
 S X="List of Visits with NO CPT code" W $$CTR(X,80),!
 W !,"Patient Name",?32,"HRN",?39,"Visit Date",?60,"Location"
 W !,$TR($J("",80)," ","-")
 Q
CTR(X,Y) ;EP - Center X in a field Y wide.
 Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
 ;----------
SETTAX ;
 S ATXFLG=1
 S APCLT=$T(@APCLTEXT),APCLTN=$P(APCLT,";;",2),APCLTN="APCL CAR "_APCLTEXT
 ;W !,"Creating Primary Care Prov disc taxonomy...",APCLTN
 S APCLDA=0 S APCLDA=$O(^ATXAX("B",APCLTN,APCLDA)) I APCLDA K ^ATXAX(APCLDA,21) S APCLTX=APCLDA G SETTAX1
 S X=APCLTN,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING APCL PRIMARY PROVIDER DISC" Q
 S APCLTX=+Y
SETTAX1 ;
 S $P(^ATXAX(APCLTX,0),U,2)=APCLTN,$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=210,$P(^(0),U,13)=0,$P(^(0),U,15)=7,^ATXAX(APCLTX,21,0)="^9002226.02101A^0^0"
 D ^XBFMK K DIADD,DLAYGO S APCLC=0 F APCLX=1:1 S X=$P($T(@APCLTEXT+APCLX),";;",2) Q:X=""  S Y=0 F  S Y=$O(^DIC(7,"D",X,Y)) Q:Y'=+Y  K DIC,DA,DR,DIADD,DLAYGO,DQ,DI,D1,D0 D
 .S APCLC=APCLC+1 S ^ATXAX(APCLTX,21,APCLC,0)=+Y,$P(^ATXAX(APCLTX,21,0),U,3)=APCLC,$P(^(0),U,4)=APCLC,^ATXAX(APCLTX,21,"AA",+Y,APCLC)=""
 .Q
 S DA=APCLTX,DIK="^ATXAX(" D IX1^DI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