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

ADEPSUB4.m

Go to the documentation of this file.
ADEPSUB4 ; IHS/HQT/MJL - SUBROUTINE & FUNCTION LIBRARY ;  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;**15**;JAN 01, 2004
 ;
 ;^TMP is a transient report global
SETREP3(ADENAM) ;EP - SETS 3-PERIOD TMP FOR PROVIDER ADENAM
 S ADEWK=$S(ADEVDT'>ADEWK1:1,ADEVDT'>ADEWK2:2,1:3)
 S:'$D(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD)) ^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD)="0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,4)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,4)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS	
 S:'$D(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL")) ^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL")="0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,4)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,4)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS
 S:'$D(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL")) ^TMP("ADEP",ADEU,ADENAM,"8. TOTAL")="0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,4)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,4)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS
 Q
 ;
SETREP4(ADENAM) ;EP - Sets 4-period TMP for provider ADENAM
 S ADEWK=$S(ADEVDT'>ADEWK1:1,ADEVDT'>ADEWK2:2,ADEVDT'>ADEWK3:3,1:4)
 S:'$D(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD)) ^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD)="0^0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,5)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,5)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER," "_ADECOD),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS
 S:'$D(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL")) ^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL")="0^0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,5)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,5)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,ADESER,"SUBTOTAL"),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS
 S:'$D(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL")) ^TMP("ADEP",ADEU,ADENAM,"8. TOTAL")="0^0^0^0"
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,ADEWK)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,ADEWK)+1
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,5)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,5)+ADECODM
 ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 S $P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,8)=$P(^TMP("ADEP",ADEU,ADENAM,"8. TOTAL"),U,8)+ADECODRV
 ;----- END IHS MODIFICATIONS
 Q
 ;
END ;EP - END PROCESSING
 I $D(ADEU) L -^TMP("ADEP",ADEU)
 K ADEBEG,ADECNOD,ADECNT,ADECOD,ADECODM,ADED0,ADED1,ADED2,ADED3
 K ADEDATE,ADEDDS,ADEDESC,ADEDFN,ADEDHD,ADEDNAM,ADEHNAM,ADEHYG
 K ADEIOP,ADEJ,ADEK,ADEL,ADEMO,ADENAM,ADEND,ADENDY,ADENOD,ADEPER
 K ADEREP,ADERTN,ADESER,ADESUBM,ADETMP,ADETOTM,ADEU,ADEVDT
 K ADEWK,ADEWK1,ADEWK2,ADEWK3,ADEX,ADEZTSK,ADEIOPAR
 Q
 ;
RD(ADESTR) ;EP -
 N ADEX,ADEY
 S ADEX="Z;D;U"
 S ADEY=$P(ADEX,";",2)_$P(ADEX,";",3)_$P(ADEX,";")_"(0)"
 S @ADEY=ADESTR
 K ADEX,ADEY,ADESTR
 Q