Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCDVDSP

APCDVDSP.m

Go to the documentation of this file.
APCDVDSP ; IHS/CMI/LAB -VISIT DISPLAY ;
 ;;2.0;IHS PCC SUITE;**2,4,5,10,11,17**;MAY 14, 2009;Build 18
 ;
EN ;PEP - can be called by other packages
 ;
 Q:'$D(APCDVDSP)
 Q:'APCDVDSP
 Q:'$D(^AUPNVSIT(APCDVDSP,0))
 D DSPLY
 D EOJ
 Q
 ;
DSPLY ;
 I $D(IOF),'$D(APCDVDSP("NO IOF")) W @IOF
 NEW D0,DA,DIC,DIQ,DR,DL,DK,DX,S
 S APCDBRK=0 ;ACC
 S APCDVDSH="-----------------------------"
 S X="",$P(X,"~",80)="" W !!,X,!!,"VISIT IEN:  ",APCDVDSP,!
 S X="HRN: "_$$HRN^AUPNPAT($P(^AUPNVSIT(APCDVDSP,0),U,5),DUZ(2),2) W !,X,!
 W APCDVDSH,"     VISIT FILE     ",APCDVDSH
 S DIC="^AUPNVSIT(",DA=APCDVDSP D EN^DIQ
DSPLY1 ;DISPLAY V FILE DATA
 S APCDVFLE=9000010 F APCDVL=0:0 S APCDVFLE=$O(^DIC(APCDVFLE)) Q:APCDVFLE>9000010.99!(APCDVFLE'=+APCDVFLE)!(APCDBRK)  D DSPLY2 Q:APCDBRK  ;ACC
 I 'APCDBRK S X="",$P(X,"~",80)="" W !!,X,!!
 Q
 ;
DSPLY2 S APCDVNM=$P(^DIC(APCDVFLE,0),U)
 S APCDVDG=^DIC(APCDVFLE,0,"GL"),APCDVIGR=APCDVDG_"""AD"",APCDVDSP,APCDVDFN)"
 S APCDVDFN="",APCDVI=0 F  S APCDVDFN=$O(@APCDVIGR) Q:APCDVDFN=""!(APCDBRK)  D DSPLY3 Q:APCDBRK  ;ACC
 Q
 ;
DSPLY3 ;
 I APCDVFLE=9000010.01 Q:$P($G(^AUPNVMSR(APCDVDFN,2)),U,1)  ;meas entered in error
 I APCDVFLE=9000010.54 Q:$P($G(^AUPNVRUP(APCDVDFN,2)),U,1)  ;V updated/reviewed entered in error
 I APCDVFLE=9000010.62 Q:$P($G(^AUPNVAMI(APCDVDFN,5)),U,1)  ;V AMI entered in error
 I APCDVFLE=9000010.63 Q:$P($G(^AUPNVSTR(APCDVDFN,5)),U,1)  ;V STROKE entered in error
 I APCDVFLE=9000010.51 Q:$P($G(^AUPNVACG(APCDVDFN,1)),U,1)  ;V ANTICOAG entered in error
 I APCDVFLE=9000010.58 Q:$P($G(^AUPNVVI(APCDVDFN,0)),U,6)  ;V VI entered in error
 I APCDVFLE=9000010.43 Q:$P($G(^AUPNVOB(APCDVDFN,0)),U,6)  ;V OB entered in error
 I $Y>(IOSL-5) D HEAD Q:APCDBRK
 I $I(APCDVI)<2 S X=20-$L(APCDVNM),Y=X\2,Z=X-Y W !,APCDVDSH,$J("",Z),APCDVNM,$J("",Y),APCDVDSH
 S DIC=APCDVDG,DA=APCDVDFN,DIQ(0)="C" D EN^DIQ
 I APCDVFLE=9000010.28 S X=$P(^AUPNVNOT(APCDVDFN,0),U) I $$VAL^XBDIQ1(8925,X,.05)="RETRACTED" D
 .W ?2,"DATE RETRACTED: ",$$VAL^XBDIQ1(8925,X,1611),!?2,"RETRACTED BY: ",$$VAL^XBDIQ1(8925,X,1610)
 Q
 ;
 I '$D(ZTQUEUED),'$D(IO("S")),$E(IOST)="C",IO=IO(0) W !!,"Enter to continue, '^' to halt " R APCDX:DTIME S:'$T APCDBRK=1 S:APCDX="^" APCDBRK=1
 Q:APCDBRK
 K S
 W:$D(IOF) @IOF
 Q
EOJ ; EOJ CLEANUP
 I '$D(ZTQUEUED),'$D(IO("S")),'APCDBRK,'$D(APCDEIN),$E(IOST)="C",IO=IO(0) W !,"End of visit display, <ENTER> to Continue" R APCDX:DTIME
 K X,Y
 K APCDVDFN,APCDVDG,APCDVDSH,APCDVDSP,APCDVFLE,APCDVI,APCDVIGR,APCDVL,APCDVNM,APCDX,APCDBRK
 Q