source: FOIAVistA/trunk/r/INCOMPLETE_RECORDS_TRACKING-DGJ/DGJTEE2.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1DGJTEE2 ;ALB/MAF - ENTER/EDIT LIST PROCESSOR SET UP VARIABLES ;SEP 5 1992@100
2 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
3EN I $P(DGJTEDT,"^",1)=1 D EDIT Q
4NEW D DATA^DGJTEE3
5Q Q
6EDIT S VALMBCK=""
7 I "^OP REPORT^DISCHARGE SUMMARY^INTERIM SUMMARY^"[$P(^VAS(393.3,+$P(^VAS(393,$P(DGJTEDT,"^",2),0),"^",2),0),"^",1) D INIT^DGJTEE2 S VALMBCK="R" Q
8 D INIT4
9 S VALMBCK="R" Q
10INCSP ;To increase speed of list.
11 ; -- format vars |- column -| |- width -|
12 I $D(DGJTREC) S X=VALMDDF("RECORD TYPE"),TC=$P(X,U,2),TW=$P(X,U,3) ; T for record type
13 I '$D(DGJTREC) S X=VALMDDF("DEFICIENCY"),DC=$P(X,U,2),DW=$P(X,U,3) ; D for deficiency
14 S X=VALMDDF("PHYSICIAN"),PC=$P(X,U,2),PW=$P(X,U,3) ; P for physician
15 S X=VALMDDF("STATUS"),SC=$P(X,U,2),SW=$P(X,U,3) ; S for status
16 S X=VALMDDF("CATEGORY"),CC=$P(X,U,2),CW=$P(X,U,3) ; C for category
17 S X=VALMDDF("EVENT DATE"),EC=$P(X,U,2),EW=$P(X,U,3) ; E for event date
18 S CM=$O(^DG(393.2,"B","COMPLETED",0))
19 S RV=$O(^DG(393.2,"B","REVIEWED",0))
20 S SN=$O(^DG(393.2,"B","SIGNED NO REVIEW",0))
21 Q
22LIST W ! S (DGJTCT,DGJC,DGJTX)=0
23 F I=0:0 S I=$O(^UTILITY("DGJTADM",$J,I)) Q:'I!(DGJC) F IFN=0:0 S IFN=$O(^UTILITY("DGJTADM",$J,I,IFN)) Q:'IFN!(DGJC) S DGJTCT=DGJTCT+1,DGJTADN=^DGPM(IFN,0),Y=$P(DGJTADN,"^",1),DGJTOA(DGJTCT)=IFN_"^"_Y D DT1 I $D(DGJTCH)!($D(DGJTCH1)) Q:DGJC=1
24 I $D(DGJTCH1) S DGJTFG=1 K DGJTCH1 Q
25 K DGJTCH,DGJTCH1
26 I DGJTCT#5'=0 D S:X="^"!('$T) DGJTFG=1 Q:DGJTFG=1 I X["?"!(X?.A) G LIST
27 . W !!,"Choose admission 1"
28 . W $S(DGJTCT=1:" ",1:"-"_DGJTCT_" ")_" or '^' to QUIT: "
29 . R X:DTIME
30 I '$D(DGJTOA($S(X]"":X,1:0))) G LIST
31 W ! S DGJTX=X
32 S DGJTAIFN=$P(DGJTOA(+X),"^",1)
33 Q
34DT1 D DT1^DGJTEE3
35 W !,$J(DGJTCT,4),">",?7,$$FMTE^XLFDT($E(Y,1,12),5),?26,$S($L(DGJTADTP)'>20:DGJTADTP,1:$E(DGJTADTP,1,20))
36 S Z=+$G(^DGPM(+$P(DGJTADN,"^",17),0)) W ?49,"Discharged: ",?61,$S(Z:$$FMTE^XLFDT($E(Z,1,12),5),1:"N/A")
37 I DGJTCT#5=0 D CHOZ
38 Q
39DT X ^DD("DD") W !,?10,DGJTCT_". "_Y I DGJTCT#5=0 D CHOZ
40 Q
41CHOZ W !!,"Type '^' to QUIT, or <RETURN> to display more ",!
42 W "Choose "_$S($D(DGJTRC):"Record ",1:"Admission "),1,$S(DGJTCT=1:"",1:"-"_DGJTCT),": " R X:DTIME S:'$T!(X["^") DGJTCH1=1,DGJC=1 I X I $D(DGJTOA(X))!($D(DGJTRC(X))) S DGJTCH=1,DGJTX=X,DGJC=1 Q
43 Q
44SETG ;SET UP TEMP GLOBAL
45 N VALMCNT,DGJCNT
46 S (VALMCNT,DGJCNT)=0
47 S X="",DGJCNT=DGJCNT+1,VALMCNT=VALMCNT+1
48 S ^TMP("DGJRPT",$J,DGJCNT,0)=X,^TMP("DGJRPT",$J,"IDX",VALMCNT,DGJCNT)=""
49 S ^TMP("DGJRPIDX",$J,DGJCNT)=VALMCNT_"^"_I
50 Q
51INIT I $D(DGJTDLT) D EN^VALM("DGJ DELETE RECORD") Q
52 D EN^VALM("DGJ IRT REC EDIT")
53 Q
54INIT1 D EN^VALM("DGJ IRT REC ENTER")
55 Q
56INIT3 D EN^VALM("DGJ EXP ENTRY")
57 Q
58INIT4 ;
59 I $D(DGJTDLT) D EN^VALM("DGJ DELETE DEFICIENCY") Q
60 D EN^VALM("DGJ DEF EDIT")
61 Q
62QUICMP ;QUICK COMPLETE OF DEFICIENCIES ON THE SCREEN
63 N DGJVALM,DGJAT,VALMY
64 S VALMBCK=""
65 D SEL^VALM2 G REP^DGJTEE:'$O(VALMY(0)) S DGJVALM=0
66 D FULL^VALM1 S VALMBCK="R"
67 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,DIE="^VAS(393," D SET
68 G ENQ
69SET I "^OP REPORT^DISCHARGE SUMMARY^INTERIM SUMMARY^"[$P(^VAS(393.3,+$P(^VAS(393,$P(DGJTEDT,"^",2),0),"^",2),0),"^",1) Q
70 S DR=".11////"_$O(^DG(393.2,"B","COMPLETED",0)) D ^DIE K DR,DA
71 Q
72ENQ G REP^DGJTEE Q
73QUIT K Z,DA,DFN,DIC,DIE,DIR,DR,DTOUT,I,IFN,PTF,VAIP,DGA1,DGJC,DGJT,DGJTADN,DGJTADTP,DGJTAT,DGJTCNT,DGJTCT,DGJTDT,DGJTDBY,DGJTDD,DGJTEDT,DGJTOUT,DGJTOA,DGJTOUT,DGJTRC,DGJTSBY,DGJTSDT,DGJTSP,DGJTSV,DGJTST,DGJTTBY,DGJTWD1,DGJFFL,DGJTPR
74 K DGT,DGJTCFLG,DGJTSDT,DGJTTBY,DGJTTD,DGJTYP,DGJTWD,DGJTX,DGPM2X,DGPMCA,DGPMDCD,DGPMT,DGPMVI,DGPMY,DIV,X,^UTILITY("DGJTADM",$J),Y,OK,POP,VAERR,DGJT1PH,DGJT2PH,DGJTDEL,DGJTCH,DGJTCH1,DGJTFG,DGJTFL,DGJTDDT,DGJTF,VAINDT
75 K DIC("S"),DIC("A") Q
Note: See TracBrowser for help on using the repository browser.