source: WorldVistAEHR/trunk/r/INCOMPLETE_RECORDS_TRACKING-DGJ/DGJOTPUL.m@ 1226

Last change on this file since 1226 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1DGJOTPUL ;ALB/MAF - CHECK PARAMETERS FOR TRANS PROD REPORT ; FEB 12 1991
2 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
3 S DGJT1X="",(DGJTFLAG,DGJTREC,DGJT2PC,DGJT3PC,DGJT4PC,DGJT5PC)=0,DGJTNODE=^VAS(393,IFN,0),DGJTDEL=$S($D(^DG(40.8,+$P(DGJTNODE,"^",6),"DT")):^("DT"),1:"") S DGJTPAR=$P(DGJTDEL,"^",6)_"^"_$P(DGJTDEL,"^",7)_"^"_$P(DGJTDEL,"^",8)
4 K DGJTNODT I $D(^VAS(393,IFN,"DT")) S DGJTNODT=^VAS(393,IFN,"DT")
5 D NOW^%DTC S X=%,DGJTNOW=X\1 S DGJTDL=0
6 I DGJTSTAT[("^"_$P(DGJTNODE,"^",11)_"^") S DGJTREC=1 D PROC
7Q Q
8PROC I $P(DGJTNODE,"^",11)=$O(^DG(393.2,"B","INCOMPLETE",0)) S X1=$P(DGJTNODE,"^",3),X2=+DGJTPAR D C^%DTC S DGJTFLAG=$S(DGJTNOW=$E(X,1,7):1,DGJTNOW>(X\1):1,1:0) S:DGJTFLAG DGJTDL=DGJTNOW-$E(X,1,7) D:DGJTFLAG DAYS D TOT1 Q
9 I $P(DGJTNODE,"^",11)=$O(^DG(393.2,"B","DICTATED",0)) S DGJTFLAG=1,X=$P(DGJTNODE,"^",3) D DAYS,TOT1 Q
10 I $P(DGJTNODE,"^",11)=$O(^DG(393.2,"B","TRANSCRIBED",0)) S X1=$P(DGJTNODT,"^",3),X2=$P(DGJTPAR,"^",2) D C^%DTC S:DGJTNOW'<(X\1) DGJTFLAG=1 D:DGJTFLAG DAYS D TOT1 Q
11 Q:$P(DGJTDEL,"^",3)=0 I $P(DGJTNODE,"^",11)=$O(^DG(393.2,"B","SIGNED",0)) S X1=$P(DGJTNODT,"^",5),X2=$P(DGJTPAR,"^",3) D C^%DTC S:DGJTNOW'<(X\1) DGJTFLAG=1 D:DGJTFLAG DAYS D TOT1 Q
12 Q
13DAYS S X1=DGJTNOW,X2=X\1 D ^%DTC S DGJTDL=X Q
14TOT1 S DGJTFLLG=0 S X1=$S('$D(DGJTNODT):DGJTNOW,$D(DGJTNODT)&($P(DGJTNODT,"^",1)]""):$P(DGJTNODT,"^",1),1:DGJTNOW),X2=$P(DGJTNODE,"^",3) S:X2>X1 X1=X2 D ^%DTC
15 I $D(DGJTNODT),$P(DGJTNODT,"^",1)']"",$P(DGJTNODT,"^",5)]"" S DGJT2PC="-" D COD S X1=$S(X]"":X,1:DGJTNOW),X2=$P(DGJTNODE,"^",3) D ^%DTC D SET S DGJT3PC="-" Q
16 S DGJDICTO=DGJDICTO+X S DGJT2PC=X_"*"
17 I $D(DGJTNODT),$P(DGJTNODT,"^",1)]"" S X1=$S($P(DGJTNODT,"^",3)]"":$P(DGJTNODT,"^",3),1:DGJTNOW),X2=$P(DGJTNODT,"^",1) D ^%DTC S DGJTRNTO=DGJTRNTO+X S DGJT3PC=X_"*" S DGJT2PC=+DGJT2PC
18 I $D(DGJTNODT),$P(DGJTNODT,"^",3)]"" D COD
19 I $D(DGJTNODT),$P(DGJTNODT,"^",3)]"" S X1=$S(X]"":X,1:DGJTNOW),X2=$P(DGJTNODT,"^",3) D ^%DTC D SET
20 Q
21COD S X=$P(DGJTNODE,"^",4) S X=$S($D(^DGPM(+X,0)):$P(^(0),"^",16),1:"") I X]"" S X=$S($D(^DGPT(X,0)):$P(^DGPT(X,0),"^",9),1:"") I X]"" S X=$S($D(^DGP(45.84,+X,0)):$P(^(0),"^",2),1:"")
22 I X']"" S DGJTFLLG=1
23 Q
24SET S DGJCOTO=DGJCOTO+X S:DGJTFLLG DGJT4PC=X_"*" S:'DGJTFLLG DGJT4PC=X S DGJT3PC=+DGJT3PC Q
Note: See TracBrowser for help on using the repository browser.