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

DGJOTP2.m

Go to the documentation of this file.
  1. DGJOTP2 ;ALB/MAF - TRANS PROD REPORT CONT. 2 ; AUG 30 1991@1000
  1. ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
  1. ;
  1. D HEAD F DGJ=0:0 S DGJTDV=$O(^UTILITY("VAS",$J,DGJTDV)) Q:DGJTDV']""!(DGU) S DGJTF=1 D @(DGJTL) Q:DGU
  1. G:DGU QUIT I DGJTLPG'=1,$D(^UTILITY("VAS",$J)) D RET G:DGU QUIT D ^DGJOTP3
  1. QUIT G QUIT^DGJOTP
  1. HD1 W ?65,$S($P(DGJTNODE,"^",2)]""&($D(^VAS(393.3,+$P(DGJTNODE,"^",2),0))):$E($P(^VAS(393.3,$P(DGJTNODE,"^",2),0),"^",1),1,3),1:"")
  1. I DGJTDIR=2 W ?70 S X=$P(DGJTNODE,"^",11) W $S(X=1:"UNDICT",X=2:"DICTAT",X=3:"TRANSC",X=4:"SIGNED",1:"")
  1. S X=$S('$D(^VAS(393,IFN,"DT")):"",$P(^("DT"),"^",1)]"":$P(^("DT"),"^",1),1:"")
  1. W ?77 S:X]"" X=$$FMTE^XLFDT(X,"5DF"),X=$TR(X," ","0") W X
  1. W ?88,$J($P(DGJTDL,"^",2),7)
  1. W ?97,$J($P(DGJTDL,"^",3),7)
  1. W ?106,$J($P(DGJTDL,"^",4),7)
  1. W ?116 S X=$P(DGJTDL,"^",2)+$P(DGJTDL,"^",3)+$P(DGJTDL,"^",4) W $J(X,7) S DGJDYAVG=DGJDYAVG+X
  1. W ?128 S X=$S(X-30'>0:0,1:X-30) W $J(X,4) S DGJ30AVG=DGJ30AVG+X
  1. Q
  1. SET S DGJTDV1=DGJTDV Q
  1. DIV W "* PENDING STATUS - Number of days pending",! Q
  1. Q
  1. DATE S DGJTX=$$FMTE^XLFDT(DGJTDT,"5DF"),DGJTX=$TR(DGJTX," ","0") W DGJTX K DGJTX Q
  1. PHY D:'DGJTFF HDR
  1. F DGJY=0:0 S DGJTPHY=$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY)) Q:DGJTPHY']""!(DGU) D:DGJTFF RET Q:DGU D:DGJTFF HEAD,HDR D HDR1 S DGJTFF=1 F DGJJ=0:0 S DGJTPT=$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY,DGJTPT)) Q:DGJTPT']""!(DGU) D PHY1 Q:DGU
  1. Q
  1. PHY1 F DFN=0:0 S DFN=$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY,DGJTPT,DFN)) Q:'DFN!(DGU) F IFN=0:0 S IFN=$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY,DGJTPT,DFN,IFN)) Q:'IFN!(DGU) S DGJTDL=^(IFN) D SET I $D(^VAS(393,IFN,0)) D PRT2 Q:DGU D PH^DGJOTP3
  1. Q
  1. SER D:'DGJTFF HDR
  1. F DGJY=0:0 S DGJTSV=$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV)) Q:DGJTSV']""!(DGU) D:DGJTFF RET Q:DGU D:DGJTFF HEAD,HDR D HDR2 S DGJTFF=1 F DGJJ=0:0 S DGJTSP=$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP)) Q:DGJTSP']""!(DGU) D HDR3,SER1 Q:DGU
  1. Q
  1. SER1 F DGJP=0:0 S DGJTPT=$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP,DGJTPT)) Q:DGJTPT']""!(DGU) D SER2
  1. Q
  1. SER2 F DFN=0:0 S DFN=$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP,DGJTPT,DFN)) Q:'DFN!(DGU) F IFN=0:0 S IFN=$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP,DGJTPT,DFN,IFN)) Q:'IFN!(DGU) S DGJTDL=^(IFN) D SET I $D(^VAS(393,IFN,0)) D PRT2 Q:DGU D SV
  1. Q
  1. PRT2 D RELP Q:DGU S DGJTNODE=^VAS(393,IFN,0)
  1. I DGJTL'="PHY" S DGJTPC=14 S DGJTPHY=$S($P(DGJTNODE,"^",DGJTPC)]""&($D(^VA(200,+$P(DGJTNODE,"^",DGJTPC),0))):$P(^(0),"^",1),1:"NOT SPECIFIED")
  1. I DGJTL="PHY" W !,$E(DGJTPT,1,20)
  1. I DGJTL="SER" W !,$E(DGJTPT,1,16)
  1. D PID^VADPT6 W:DGJTL="SER" ?19 W:DGJTL'="SER" ?23 W VA("BID")
  1. S DGJTDT=$P(DGJTNODE,"^",3) W:DGJTL="SER" ?26 W:DGJTL="PHY" ?31 D DATE
  1. W:DGJTL="SER" ?39 W:DGJTL="PHY" ?44 W $S($P(DGJTNODE,"^",5)]""&($D(^SC(+$P(DGJTNODE,"^",5),0))):$E($P(^SC($P(DGJTNODE,"^",5),0),"^",1),1,12),1:"")
  1. W:DGJTL="SER" ?53,$E(DGJTPHY,1,10) D HD1 Q
  1. RET F X=$Y:1:(IOSL-3) W !
  1. D DIV Q:IOST'?1"C-".E
  1. R ?22,"Enter <RET> to continue or ^ to QUIT ",X:DTIME S:X["^"!('$T) DGU=1 Q:DGU S DGFLAG=1 Q
  1. RELP I $Y+8>IOSL D RET:(IOST?1"C-".E) Q:DGU D HEAD
  1. Q
  1. HDR W !?5,"DIVISION: ",DGJTDV Q
  1. HDR1 W !?6,"PHYSICIAN: ",DGJTPHY Q
  1. HDR2 W !?6,"SERVICE: ",DGJTSV Q
  1. HDR3 W !?7,"SPECIALTY: ",DGJTSP Q
  1. SV D SV^DGJOTP3 Q