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

ACRFDTP.m

Go to the documentation of this file.
ACRFDTP ;IHS/OIRM/DSD/THL,AEF - LOOKUP AND DISPLAY FINANCIAL DATA;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE CALLED FOR DISPLAY AND SELECTION OF ALL ACCOUNTS
EN Q:$D(ACROUT)
 N ACRI
 K ACRQUIT
 F  D EN1 Q:$D(ACROUT)!$D(ACRQUIT)!$D(ACROUT)
EXIT D EXIT^ACRFEXIT:'$D(ACRDEL)
 Q
EN1 D SET
 D ^ACRFONE:ACRENTR1["LOCBAMT"&(ACRENTRY["OBLAMT")
 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 S ACRENTRY=$P(ACRENTRY," ")
 I $D(ACRUP) D  Q
 .D FDTP
 .S:$D(ACRFDNO) ACRUP=ACRFDNO
 .S ACRQUIT=""
 D FDTP:'$D(ACRONE)
 D SOF^ACRFDTP4:($D(ACRSOFX)!$D(ACRSOF))&$D(ACRONE)
 I $D(ACRFDNO),'$D(ACRQUIT),'$D(ACRSOF),'$D(ACRSOFX),'$D(ACRTDEL) D
 .D ENTRY^ACRFEA:'$D(ACRCSI)
 .D CSI:$D(ACRCSI)
 .K ACRX,ACRJ,ACR,ACRY,ACRZ,ACRFD,ACRFDNA,ACRFDNO,ACRCONT,ACRCSIS,ACRTYPS
 .S:$D(ACRONE) ACRQUIT=""
 I $D(ACRFDNO),$D(ACRTDEL) D T1^ACRFDEL
 Q
FDTP ;EP;TO DISPLAY FINANCIAL DATA
 Q:$D(ACROUT)
 W @IOF
 K:ACRGREF["OBL" ACRDISP
 D SUBHEAD^ACRFDTP2:'$D(ACRQUIT)&$D(ACRDISP)
 I '$D(ACRFDNO) D @ACRENTR1^ACRFDTP3 I 1
 E  D @ACRENTR2^ACRFDTP3:$D(ACRENTR2)
FDTP11 D FDTPX2:$D(ACRCONV)&$D(ACRFDNO)&'$D(ACRQUIT)
 D FDTPX1:'$D(ACRFDNO)!'$D(ACRCONV)
 Q
FDTPX1 S ACRFD=0
 S ACRK=$S(ACRENTRY["OBLAMT":31,1:21)
 S ACRXREF=$S('$D(ACRFDNO):"SEC",ACRGREF["OBL":"D",1:"M")
 S ACRDFN=$S('$D(ACRFDNO):DUZ,1:ACRFDNO)
 S ACRJ=0
 K ACR
 S ACRFD=999999999
 F  S ACRFD=$O(@ACRGREF@(ACRXREF,ACRDFN,ACRFD),-1) Q:'ACRFD  D DTP Q:$D(ACRPSE)
 D DISP2^ACRFDTP5:$D(ACR(ACRJ))&'$D(ACRPSE)
 K ACRJ,ACRPSE
 D FDTP1:'$D(ACRFDNO)
 K ACRFD
 Q
DTP Q:'$D(@ACRGREF@(ACRFD,0))
 D FDTPA1:'$D(ACRFDNO)
 D FDTPA2:$D(ACRFDNO)&'$D(ACRCONV)
 I (ACRGREF["LOCB"&(ACRJ#10=0))!((ACRGREF'["LOCB")&(ACRJ#20=0)) D DISP2^ACRFDTP5
 Q
FDTPX2 S (ACRJ,ACRFD)=0
 K ACR
 S ACRFD=999999999
 F  S ACRFD=$O(^ACROBL("ACONV",ACRFDNO,"Y",ACRFD),-1) Q:'ACRFD  D FDTPA2 Q:$D(ACRPSE)
 D DISP2^ACRFDTP5:$D(ACR(ACRJ))&'$D(ACRPSE)
 D FDTP1:'$D(ACRFDNO)
 K ACRFD,ACRPSE
 Q
FDTPA1 D D
 Q
FDTPA2 ;SCREEN ENTRIES FOR DISPLAY
 Q:'$D(@ACRGREF@(ACRFD,0))
 Q:$P(@ACRGREF@(ACRFD,0),U,$S(ACRENTRY["ALC"!(ACRENTRY["OBL"):3,ACRENTRY["LOCB":4,1:2))'=ACRFDNO
 I ACRENTRY'["OBLAMT" D D Q
 S ACRDOCDA=ACRFD
 D SETDOC^ACRFEA1
 I $D(ACRQUIT) K ACRQUIT Q
 I ACRENTRY["OBLAMT",'$D(ACRCTV) D
 .I '$D(ACRCOMP),'$D(ACRCONV),'$D(ACRREACT),$D(ACRCSI) D D Q
 .I '$D(ACRCOMP),'$D(ACRCONV),'$D(ACRREACT),$P(ACROBLAP,U)="A"!($P(ACROBLAP,U,3)="A")!($P(ACROBLAP,U,6)="A") Q
 .I '$D(ACRCOMP),'$D(ACRCONV),'$D(ACRREACT),$P(ACROBLAP,U)]"","CD"[$P(ACROBLAP,U)!($P(ACROBLAP,U,3)="D")!($P(ACROBLAP,U,6)="D") Q
 .I '$D(ACRCOMP),'$D(ACRCONV),$D(ACRREACT),'$D(ACRJVOD) D  Q
 ..I $P(ACROBLAP,U)]"","ACD"[$P(ACROBLAP,U)!($P(ACROBLAP,U,3)="D"),'$$OBL^ACRFEA(ACRDOCDA) D D Q
 .I '$D(ACRCOMP),'$D(ACRCONV),$D(ACRJVOD) D  Q
 ..I $E(ACROBLAP)="A",$P(ACROBLAP,U,3)="A" D D Q
 .I $D(ACRCOMP),$P(ACROBLAP,U)="",$P(ACROBLAP,U,3)="" Q
 .I $D(ACRCOMP),$P(ACROBLAP,U)]"","ACD"[$P(ACROBLAP,U)!("ACD"[$P(ACROBLAP,U,3)) D D Q
 .D D
 Q:$D(ACRCOMP)
 I ACRENTRY["OBLAMT",$D(ACRCTV) D
 .I ACRREF=600,$P(ACRDOC0,U,6)=ACRFDNO,$P(ACROBLAP,U)]"","CD"'[$E(ACROBLAP),$P(ACROBLAP,U,7)=19,$P(ACROBLAP,U,8)="" D D
Q Q
FDTP1 S ACRDIC(0)=$S(ACRENTRY["APPAMT":"AELNZ",1:"AENQZ")
 S (ACRDIC,ACRDIE)=ACRGREF_"("
 I ACRENTRY'["APP",'$D(ACRCONV) D
 .S DIC("S")="I $D("_$S(ACRENTRY["ALLAMT"&(ACRENTR1["APP"):"^ACRAPP",ACRENTR1["ALLAMT":"^ACRALW",ACRENTR1["ALC":"^ACRALC",ACRENTR1["LOCB":"^ACRLOCB")_"(""SEC"",DUZ,+Y))"
 I ACRENTRY["OBLA",'$D(ACRCONV) D
 .S DIC("S")=DIC("S")_",$P(^ACRLOCB(+Y,0),U,8)=""O"""
 W !
 D EDIC^ACRFDTP4
 S ACRGL=$P($P($T(@ACRENTRY^ACRFCTL1),";;",3),"(")
 I '$D(ACRQUIT),'$D(@ACRGL@("M",ACRZDA)),ACRENTRY["ALL"!(ACRENTRY["ALC")!(ACRENTRY["LOC") D ^ACRFDF
 Q
D Q:'$D(@ACRGREF@(ACRFD,0))
 S ACRFD1=$P(@ACRGREF@(ACRFD,0),U,8)
 S ACRJ=ACRJ+1
 I '$D(ACRFDNO) D @ACRENTR1^ACRFDTP4 Q
 D @ACRENTR2^ACRFDTP4
 Q
ENTRY ;EP;
 S:$D(ACRENTR1) ACRDATA1=$T(@ACRENTR1^ACRFCTL1)
 D EN
 Q
SET N X
 S X=ACRDATA1
 S ACRRTN=$P(X,";;",4)
 S ACRGREF=$P($P(X,";;",3),"(")
 S (ACRTYPS,ACRY)=$P(X,";;",2)
 S ACRDR=$P(X,";;",5)
 S ACRDIC("A")=$P(X,";;",6)
 S ACRD=$TR($P(X,";;",7),",","^")
 Q
CSI ;
 S DIR(0)="SO^1:Individual Request;2:Summary of All Requests"
 S DIR("A")="Which one"
 D DIR^ACRFDIC
 Q:+$G(Y)<1
 I Y=1 K ACRCSIS D ENTRY^ACRFEA Q
 I Y=2 D
 .S ACRCSIS=""
 .S ACRRTN="ENTRY^ACRFEA"
 .S ZTDESC="REPORT OF PENDING DOCUMENTS."
 .S ACRPRT=""
 .D ^ACRFZIS
 .K ACRDISP,ACRPRT
 Q