VistA-FOIAVistA/r/INCOMPLETE_RECORDS_TRACKING.../DGJTEE2.m

76 lines
3.6 KiB
Mathematica
Raw Normal View History

DGJTEE2 ;ALB/MAF - ENTER/EDIT LIST PROCESSOR SET UP VARIABLES ;SEP 5 1992@100
;;1.0;Incomplete Records Tracking;;Jun 25, 2001
EN I $P(DGJTEDT,"^",1)=1 D EDIT Q
NEW D DATA^DGJTEE3
Q Q
EDIT S VALMBCK=""
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
D INIT4
S VALMBCK="R" Q
INCSP ;To increase speed of list.
; -- format vars |- column -| |- width -|
I $D(DGJTREC) S X=VALMDDF("RECORD TYPE"),TC=$P(X,U,2),TW=$P(X,U,3) ; T for record type
I '$D(DGJTREC) S X=VALMDDF("DEFICIENCY"),DC=$P(X,U,2),DW=$P(X,U,3) ; D for deficiency
S X=VALMDDF("PHYSICIAN"),PC=$P(X,U,2),PW=$P(X,U,3) ; P for physician
S X=VALMDDF("STATUS"),SC=$P(X,U,2),SW=$P(X,U,3) ; S for status
S X=VALMDDF("CATEGORY"),CC=$P(X,U,2),CW=$P(X,U,3) ; C for category
S X=VALMDDF("EVENT DATE"),EC=$P(X,U,2),EW=$P(X,U,3) ; E for event date
S CM=$O(^DG(393.2,"B","COMPLETED",0))
S RV=$O(^DG(393.2,"B","REVIEWED",0))
S SN=$O(^DG(393.2,"B","SIGNED NO REVIEW",0))
Q
LIST W ! S (DGJTCT,DGJC,DGJTX)=0
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
I $D(DGJTCH1) S DGJTFG=1 K DGJTCH1 Q
K DGJTCH,DGJTCH1
I DGJTCT#5'=0 D S:X="^"!('$T) DGJTFG=1 Q:DGJTFG=1 I X["?"!(X?.A) G LIST
. W !!,"Choose admission 1"
. W $S(DGJTCT=1:" ",1:"-"_DGJTCT_" ")_" or '^' to QUIT: "
. R X:DTIME
I '$D(DGJTOA($S(X]"":X,1:0))) G LIST
W ! S DGJTX=X
S DGJTAIFN=$P(DGJTOA(+X),"^",1)
Q
DT1 D DT1^DGJTEE3
W !,$J(DGJTCT,4),">",?7,$$FMTE^XLFDT($E(Y,1,12),5),?26,$S($L(DGJTADTP)'>20:DGJTADTP,1:$E(DGJTADTP,1,20))
S Z=+$G(^DGPM(+$P(DGJTADN,"^",17),0)) W ?49,"Discharged: ",?61,$S(Z:$$FMTE^XLFDT($E(Z,1,12),5),1:"N/A")
I DGJTCT#5=0 D CHOZ
Q
DT X ^DD("DD") W !,?10,DGJTCT_". "_Y I DGJTCT#5=0 D CHOZ
Q
CHOZ W !!,"Type '^' to QUIT, or <RETURN> to display more ",!
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
Q
SETG ;SET UP TEMP GLOBAL
N VALMCNT,DGJCNT
S (VALMCNT,DGJCNT)=0
S X="",DGJCNT=DGJCNT+1,VALMCNT=VALMCNT+1
S ^TMP("DGJRPT",$J,DGJCNT,0)=X,^TMP("DGJRPT",$J,"IDX",VALMCNT,DGJCNT)=""
S ^TMP("DGJRPIDX",$J,DGJCNT)=VALMCNT_"^"_I
Q
INIT I $D(DGJTDLT) D EN^VALM("DGJ DELETE RECORD") Q
D EN^VALM("DGJ IRT REC EDIT")
Q
INIT1 D EN^VALM("DGJ IRT REC ENTER")
Q
INIT3 D EN^VALM("DGJ EXP ENTRY")
Q
INIT4 ;
I $D(DGJTDLT) D EN^VALM("DGJ DELETE DEFICIENCY") Q
D EN^VALM("DGJ DEF EDIT")
Q
QUICMP ;QUICK COMPLETE OF DEFICIENCIES ON THE SCREEN
N DGJVALM,DGJAT,VALMY
S VALMBCK=""
D SEL^VALM2 G REP^DGJTEE:'$O(VALMY(0)) S DGJVALM=0
D FULL^VALM1 S VALMBCK="R"
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
G ENQ
SET I "^OP REPORT^DISCHARGE SUMMARY^INTERIM SUMMARY^"[$P(^VAS(393.3,+$P(^VAS(393,$P(DGJTEDT,"^",2),0),"^",2),0),"^",1) Q
S DR=".11////"_$O(^DG(393.2,"B","COMPLETED",0)) D ^DIE K DR,DA
Q
ENQ G REP^DGJTEE Q
QUIT 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
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
K DIC("S"),DIC("A") Q