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

APCPRCH1.m

Go to the documentation of this file.
  1. APCPRCH1 ; IHS/TUCSON/LAB - AMBULATORY OPERATIONS SUMMARY AUGUST 14, 1992 ; [ 02/14/00 2:22 PM ]
  1. ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**1,4**;APR 03, 1998
  1. ;IHS/CMI/LAB - patch 4 file 200 conversion
  1. ;IHS/CMI/LAB - XTMP
  1. START ;
  1. S APCPRCH("80D")="-------------------------------------------------------------------------------"
  1. D CHKSITE^APCPDRI
  1. S APCPRCH("RUN SITE")=+^APCPSITE(1,0)
  1. S APCPRCH(" PRINT")=$P(^DIC(4,APCPRCH("RUN SITE"),0),U)
  1. S Y=$P(^APCPLOG(APCPRCH("LOG"),0),U,3) D DD^%DT S APCPRCH("RUN DATE")=Y
  1. S APCPRCH("PG")=0
  1. D HEAD
  1. I '$D(^XTMP("APCPRCH",APCPJOB,APCPBTH)) W !!,"No CHA records" G EOJ
  1. K APCPRCH("QUIT")
  1. D PROC
  1. G:$D(APCPRCH("QUIT")) EOJ
  1. W !!?50,"TOTAL CHA RECORDS: ",^XTMP("APCPRCH",APCPJOB,APCPBTH,"GEN","TOTAL")
  1. I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of report. HIT RETURN" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. EOJ ;
  1. K ^XTMP("APCPRCH",APCPJOB,APCPBTH)
  1. W:$D(IOF) @IOF
  1. Q
  1. PROC ;
  1. S APCPRCH("V")=0 F S APCPRCH("V")=$O(^XTMP("APCPRCH",APCPJOB,APCPBTH,"VISITS",APCPRCH("V"))) Q:APCPRCH("V")'=+APCPRCH("V")!($D(APCPRCH("QUIT"))) D PRINT
  1. Q
  1. PRINT ;
  1. I $Y>(IOSL-6) D HEAD Q:$D(APCPRCH("QUIT"))
  1. S APCPRCH("VR")=^AUPNVSIT(APCPRCH("V"),0),APCPRCH("V LOC")=$P(APCPRCH("VR"),U,6),APCPRCH("V LOC")=$E($P(^DIC(4,APCPRCH("V LOC"),0),U),1,17),APCPRCH("TYPE")=$P(APCPRCH("VR"),U,3),APCPRCH("SC")=$P(APCPRCH("VR"),U,7)
  1. CLINIC ;
  1. S APCPRCH("CLINIC")=$P(^AUPNVSIT(APCPRCH("V"),0),U,8) I APCPRCH("CLINIC")="" S APCPRCH("CLINIC")="--" G HRN
  1. S APCPRCH("CLINIC")=$P(^DIC(40.7,APCPRCH("CLINIC"),0),U,2)
  1. HRN S APCPRCH("PAT DFN")=$P(APCPRCH("VR"),U,5),APCPRCH("HRN")="" S:$D(^AUPNPAT(APCPRCH("PAT DFN"),41,APCPRCH("RUN SITE"),0)) APCPRCH("HRN")=$P(^AUPNPAT(APCPRCH("PAT DFN"),41,APCPRCH("RUN SITE"),0),U,2)
  1. S Y=$P(APCPRCH("VR"),U,13),APCPRCH("DATE LAST MOD")=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)
  1. VD ;
  1. S Y=+APCPRCH("VR") X ^DD("DD") S APCPRCH("RD")=Y
  1. PRN ;
  1. W !,APCPRCH("HRN"),?8,APCPRCH("RD"),?27,APCPRCH("V LOC"),?47,APCPRCH("CLINIC"),?51,APCPRCH("DATE LAST MOD")
  1. S (X,C)=0 F S X=$O(^AUPNVPRV("AD",APCPRCH("V"),X)) Q:X'=+X D
  1. .I $P(^DD(9000010.06,.01,0),U,2)[200 W:C>0 ! W ?61,$E($P(^VA(200,$P(^AUPNVPRV(X,0),U),0),U),1,18) S C=C+1
  1. .I $P(^DD(9000010.06,.01,0),U,2)[6 W:C>0 ! W ?61,$E($P(^DIC(16,$P(^AUPNVPRV(X,0),U),0),U),1,18) S C=C+1
  1. Q
  1. I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S APCPRCH("QUIT")="" Q
  1. HEAD1 ;
  1. W:$D(IOF) @IOF S APCPRCH("PG")=APCPRCH("PG")+1
  1. S APCPRCH("LENG")=30+$L(APCPRCH(" PRINT"))
  1. W !,"Report Run Date: ",APCPRCH("DTP"),?70,"Page ",APCPRCH("PG")
  1. W !!?((80-APCPRCH("LENG"))/2),"PCC DATA TRANSMISSION FOR ",APCPRCH(" PRINT")
  1. W !?15,"Listing of VISITS that Generated CHA Transactions"
  1. W !?18,"Date Export Run: ",APCPRCH("RUN DATE")
  1. W !?8,"Visits Processed for Posting Dates: ",APCPRCH("PRINT BEGIN")," to ",APCPRCH("PRINT END")
  1. W !!,APCPRCH("80D"),!," HRN ",?8,"VISIT DATE/TIME",?28,"LOCATION",?47,"CL",?51,"DATE MOD",?61,"PROVIDERS",!,APCPRCH("80D"),!
  1. Q
  1. C42 ;;
  1. C51 ;;
  1. C52 ;;
  1. C53 ;;
  1. C54 ;;
  1. C56 ;;
  1. C60 ;;
  1. C68 ;;