source: FOIAVistA/trunk/r/INCOMPLETE_RECORDS_TRACKING-DGJ/DGJTEE.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1DGJTEE ;MAF,ESD/ALB - ENTER/EDIT OPTION AND MAIN LIST PROCESSOR RTN ; JUN 21 1992@800
2 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
3START K XQORS,VALMEVL D EN^VALM("DGJ DEFICIENCY LIST")
4 Q
5START1 K XQORS,VALMEVL D EN^VALM("DGJ IRT RECORD LIST")
6 Q
7START2 K XQORS,VALMEVL D EN^VALM("DGJ DELETE SINGLE")
8 Q
9START3 S DGJTOPT=1 D EN^VALM("DGJ COMP EDIT SINGLE")
10 Q
11START4 D EN^VALM("DGJ COMP EDIT SUPER")
12 Q
13START5 D EN^VALM("DGJ DELETE SUPER")
14 Q
15START6 K XQORS,VALMEVL S DGJVIEW=1 D EN^VALM("DGJ IRT VIEW")
16 K DGJVIEW Q
17EN S (DGJTDD,DGJTDBY,DGJTTD,DGJTTBY,DGJTSDT,DGJTSBY,DGJTOUT,DGJT2PH)="",(DGJTFG,DGJTAT,DGJTFLAG,DGJTIOFL,DGJCNT1)=0 S DGJTCFLG=1
18 I $D(^DG(43,1,"GL")) S X=$P(^DG(43,1,"GL"),"^",2) I X=1 S DIR(0)="393,.06",DIR("A")="Select DIVISION " D ^DIR S:Y="^"!($D(DTOUT)) VALMQUIT="",DGJTFLAG=1 G:DGJTFLAG INITQ S DGJTDV=Y K DIR("A")
19 I '$D(DGJTDV) S X=$O(^DG(40.8,0)) S DGJTDV=X_"^"_$P(^DG(40.8,+X,0),"^")
20 S DGJTDEL=^DG(40.8,+DGJTDV,"DT") I $P(DGJTDEL,"^",5)=0 W !!?10,"This facility not tracking for OUTPATIENT OP REPORTS!",! S DGJTIOFL=1
21 S (VALMCNT,DGJCNT)=0,VALMBG=1
22PAT K DGJTOA S DIC="^DPT(",DIC(0)="AQEMZ" D ^DIC
23 I $D(DTOUT)!($D(DUOUT)) S VALMQUIT="" G INITQ
24 I Y<0 G PAT
25 S (DFN,DGJTPT)=+Y
26 S DGJTNODE=^DPT(DFN,0) D PID^VADPT6 S DGJID=VA("PID")
27 I DGJTIOFL S DGJTSR1=1 G INP
28OUT1 S DGJFL=0 W !!,"Display for: (I)Inpatients, (O)Outpatients INPATIENTS// " R X:DTIME S:X="^"!('$T) VALMQUIT="" G:X="^"!('$T) INITQ D ZSET2 I X=""!("Ii"[X) S X=1
29 S X=$S("Oo"[X:2,1:X)
30 I X="?" D ZSET2,HELP2 G OUT1
31 S DGJTSR1=$E(X) D IN^DGJHELP W ! I %=-1 D ZSET2,HELP2 G OUT1
32 I DGJTSR1=2 G EVDT
33INP D WARN^DGJTUTL I '$D(^UTILITY("DGJTADM",$J)) I $P(DGJTDEL,"^",5)=0!(DGJTSR1=1) G PAT
34 I '$D(^UTILITY("DGJTADM",$J)),$P(DGJTDEL,"^",5) D NUL Q
35 S DGJTFG=0 D LIST^DGJTEE2 I DGJTFG S VALMQUIT="" G INITQ
36EVDT D WAIT^DICD K ^TMP("DGJDEF",$J),DGJCAT,DGJDISD S (VALMCNT,DGJCNT,DGJCNT1,DGJTFG,DGJTFLG)=0 I DGJTSR1=2 S DGJTAIFN="" D SCR^DGJTEE3 D:'$O(^TMP("DGJDEF",$J,0)) NUL Q
37 S DGJTDIV=$P(^DGPM(DGJTAIFN,0),"^",6),DGJTDIV=$P($G(^DIC(42,+DGJTDIV,0)),"^",11)
38 S VALMBG=1,DGJTCT=0 F IFN=0:0 S IFN=$O(^VAS(393,"ADM",DGJTAIFN,IFN)) Q:'IFN I $D(^VAS(393,IFN,0)) S DGJTYP=$P(^VAS(393,IFN,0),"^",2) S DGJTCDIS=$S(DGJTYP]"":$P(^VAS(393.41,$P(^VAS(393.3,DGJTYP,0),"^",6),0),"^",4),1:"NOT SPECIFIED") D UTIL
39 N CC,CM,CW,DC,DW,EC,EW,PC,PW,RV,SC,SN,SW,TC,TW D INCSP^DGJTEE2 D LOOP^DGJTEE1 I '$O(^TMP("DGJDEF",$J,0)) D NUL
40 Q
41UTIL S ^TMP("DGJ",$J,DGJTCDIS,DGJTYP,IFN)="" S:$O(^VAS(393.3,"B","DISCHARGE SUMMARY",0))=DGJTYP DGJDISD=1 Q
42INITQ Q
43Q K DIC("A"),DIC("B"),DIC("S") S VALMBCK="R" Q
44ZSET2 S Z="^1 INPATIENTS^2 OUTPATIENTS^" Q
45HELP2 W !!,"Choose a number or first initial:" F K=2:1:3 W !?15,$P(Z,"^",K)
46 W ! Q
47DATA I 'DGJTEDT S X=DGJTAIFN D NEW1
48 Q
49NEW ;EDIT CODE
50 N DGJVALM,DGJAT,VALMY
51 S VALMBCK=""
52 D SEL^VALM2 G ENQ:'$O(VALMY(0)) S DGJVALM=0
53 D FULL^VALM1 S VALMBCK="R"
54 F DGJVALM=0:0 S DGJVALM=$O(VALMY(DGJVALM)) Q:'DGJVALM S DA=$P($G(^TMP("DGJIDX",$J,DGJVALM)),"^",2) I DA]"" S DGJTEDT="1^"_DA S DGJDFNO=DA,DIC="^VAS(393," D EN^DGJTEE2
55ENQ D REP Q
56FNL K DGJTDD,DGJTDBY,DGJTTD,DGJTTBY,DGJTSDT,DGJTSBY,DGJTOUT,DGJT2PH,DGJTFG,DGJTAT,DGJTFLAG,DGJTCFLG,DGJID,DGJTAIFN,DGJTDIV,DGJTDV,DGJTFLG,DGJTNODE,DGJTPT,VA,DGJTCT,DGJTIOFL,DGJTSR1,DGX,IFN,K,VALMQUIT,Z,DGJC,DGJFL,DGJTADTP,^TMP("DGJDEF",$J)
57 K DGJTCNT,DGJTF,I,VAERR,DGJTOA,DGJDFNO,DGJI,DGJNOTY,DGJTFL,DGJTYP,DGJVAL,DGJTREC,DGJCAT,DGJCNT1,DGJTCAT,DGJTCDIS,DGJVAL1,DGJX,DGJCPDFN,DGJCPNOD,DGJCPSR1,DGJIFNO,^TMP("DGJ",$J),^TMP("DGJIDX",$J)
58 K DGJTDT,DGJTDDT,DGJT1PH,DGJT,DGJTOPT,DGJTWD1,DGJTWD,DGJTSV,DGJTSP,DGJTPR,DIV,POP,S,VAIP,DGJCPTX,DGJDISD,DGJVIEW
59QUIT K %,%Y,DA,DFN,DGA1,DGJTADN,DGJTAIFN,DGJTCH,DGJTCH1,DGJCNT,DGJTDEF,DGJTDEL,DGJTDLT,DGJTEDT,DGJTEDT1,DGJTFG,DGJTFLG,DGJTIFN,DGJTST,DGJTX,DGT,DIC,DIE,DIK,DIR,DR,I,X,Y,^TMP("DGJDEF",$J) Q
60NEW1 ;ENTER CODE
61 K DGJTEDT
62 D FULL^VALM1
63CAT I DGJTSR1=1&('$D(DGJTREC)) N DGJY S DIC="^VAS(393.41,",DIC(0)="AEMN" D ^DIC K DIC G:X["^" REP G:Y<0 CAT S DGJY=+Y
64TYP I '$D(DGJTREC) S DIC("S")="I $P(^VAS(393.3,+Y,0),U,6)=+DGJY,$P(^VAS(393.3,+Y,0),U,7)=1" D CAT1
65 I DGJTSR1=2 S DIC("S")="I $S(""^OP REPORT^""[$P(^VAS(393.3,+Y,0),U,1):1,1:0)"
66 I DGJTSR1=1,$D(DGJTREC) S DIC("S")="I $S(""^OP REPORT^INTERIM SUMMARY^DISCHARGE SUMMARY^""[$P(^VAS(393.3,+Y,0),U,1):1,1:0)"
67 S DIC="^VAS(393.3,",DIC("A")="Enter TYPE OF DEFICIENCY: ",DIC(0)="AEMQ" D ^DIC G Q:X["^"!($D(DTOUT)) S DGJTYP=+Y K DIC("S"),DIC("A"),DIC("B") I X']"" G TYP
68 K DGJY D EDIT,REP Q
69CAT1 I $D(DGJDISD) S DIC("S")=DIC("S")_",""^DISCHARGE SUMMARY^""'[$P(^VAS(393.3,+Y,0),U,1)"
70 Q
71EDIT D FULL^VALM1
72 S DGJTDV=$P(DGJTDV,"^",1)
73 D NEW^DGJTEE2
74 Q
75REP K DR D EVDT S VALMBG=1,VALMBCK="R" Q
76HDR D HDR^DGJTEE1
77 Q
78NUL ;NULL MESSAGE
79 K ^TMP("DGJDEF",$J) S ^TMP("DGJDEF",$J,1,0)=" ",^TMP("DGJDEF",$J,2,0)=$S($D(DGJTCOM):"There are no Completed IRTs for this patient",1:"There are no DEFICIENCIES that meet this action's criteria."),^TMP("DGJIDX",$J,1)=1,^TMP("DGJIDX",$J,2)=2
80 Q
Note: See TracBrowser for help on using the repository browser.