source: FOIAVistA/trunk/r/INCOMPLETE_RECORDS_TRACKING-DGJ/DGJOPRT.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1DGJOPRT ;ALB/MAF - SORT/PRINT IRT ; JAN 28,1991@900
2 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
3EN S DGJTDIR=1,DGJTSTAT="^"_$O(^DG(393.2,"B","INCOMPLETE",0))_"^" G OUT
4EN1 S (DGJTDIR,DGJTCK)=2
5OUT S (DGJFL,DGJTMESS)=0 W !!,"Sort output by: PATIENT// " D ZSET1 S X="" R X:DTIME G QUIT:X="^"!('$T) I X=""!("Pp"[X) S X="2"
6 S X=$S("Ee"[X:1,"Dd"[X:3,"Ss"[X:4,1:X)
7 I X="?" D ZSET1,HELP1 G OUT
8 S DGJTSR=$E(X) D IN^DGJHELP W ! I %=-1 D ZSET1,HELP1 G OUT
9OUT1 S DGJFL=0 W !!,"Print report for: (I)Inpatients, (O)Outpatients, (B)Both// " D ZSET2 S X="" R X:DTIME G QUIT:X="^"!('$T) I X=""!("Bb"[X) S X=3
10 S X=$S("Ii"[X:1,"Oo"[X:2,1:X)
11 I X="?" D ZSET2,HELP2 G OUT1
12 S DGJTSR1=$E(X) D IN^DGJHELP W ! I %=-1 D ZSET2,HELP2 G OUT1
13 I $D(^DG(43,1,"GL")) S DGJTMUL=$P(^DG(43,1,"GL"),"^",2)
14 I DGJTDIR=2 D SEL G QUIT:$D(DUOUT)!$D(DTOUT)
15 S DGJTL=$S(DGJTSR=1:"DAT",DGJTSR=2:"PAT",DGJTSR=3:"PHY",DGJTSR=4:"SER",1:"QUIT")
16 G ^DGJOPRT1
17QUIT K %,BY,DHD,DIC,DIOEND,DIS,DIR,DTOUT,DUOUT,FR,FLDS,K,L,TO,DGJTCK,DGJTDIR,DGJTL,DGJTMESS,DGJTMUL,DGJTSR,DGJTSTAT,DGJTUN,VAUTN,VAUTY,DGJFL,DGJTSR1,DGJ(0),X,Y,Z Q
18HELP1 W !!,"Choose a number or first initial :" F K=2:1:5 W !?15,$P(Z,"^",K)
19 W ! Q
20HELP2 W !!,"Choose a number or first initial:" F K=2:1:4 W !?15,$P(Z,"^",K)
21 W ! Q
22ZSET1 S Z="^1 EVENT DATE^2 PATIENT^3 DOCTOR^4 SERVICE/TREATING SPECIALTY^" Q
23ZSET2 S Z="^1 INPATIENTS ONLY^2 OUTPATIENTS ONLY^3 BOTH INPATIENT and OUTPATIENTS^" Q
24SEL S DIR("A")="Select INCOMPLETE RECORD STATUS: ",DIR(0)="SA^A:ALL;D:UNDICTATED;T:NOT TRANSCRIBED;S:UNSIGNED;R:NOT REVIEWED",DIR("B")="ALL"
25 S DIR("?")="Enter desired status that you would like to have listed on the report"
26 S DIR("?",1)="CHOOSE FROM: "
27 S DIR("?",2)=" A FOR ALL",DIR("?",3)=" D FOR UNDICTATED",DIR("?",4)=" T FOR NOT TRANSCRIBED",DIR("?",5)=" S FOR UNSIGNED",DIR("?",6)=" R FOR NOT REVIEWED" D ^DIR
28 I $D(DTOUT)!$D(DUOUT) Q
29 I Y="A" S DGJTSTAT="^"_$O(^DG(393.2,"B","INCOMPLETE",0))_"^"_$O(^DG(393.2,"B","DICTATED",0))_"^"_$O(^DG(393.2,"B","TRANSCRIBED",0))_"^"_$O(^DG(393.2,"B","SIGNED",0))_"^" Q
30 S DGJTSTAT="^"
31 D SET
32 S $P(DIR(0),"^",1)=$P(DIR(0),"^",1)_"O",$P(DIR(0),"^",2)=$E($P(DIR(0),"^",2),7,999) K DIR("B")
33 F I=2:1:6 S DIR("?",I)=$S($D(DIR("?",I+1)):DIR("?",I+1),1:"")
34 S DIR("A")="Select another STATUS: "
35ASK D ^DIR I $D(DUOUT)!$D(DTOUT) Q
36 I X]"" D SET G ASK
37 Q
38SET S X=$S(Y="D":"INCOMPLETE",Y="T":"DICTATED",Y="S":"TRANSCRIBED",Y="R":"SIGNED",Y="C":"r",1:"INCOMPLETE")
39 S X=$O(^DG(393.2,"B",X,0))
40 S DGJTSTAT=DGJTSTAT_X_"^"
41 Q
42CK S X=Y Q
Note: See TracBrowser for help on using the repository browser.