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

DGJTVW3.m

Go to the documentation of this file.
DGJTVW3 ;ALB/MAF - DISPLAY SCREENS FOR DEFICIENCIES (LIST PROCESSOR)  ; SEP 31,1992@900
 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
EN Q:'$D(^VAS(393,+$P(DGJTEDT,"^",2),0))  S DGJTNO=^VAS(393,$P(DGJTEDT,"^",2),0),DFN=+DGJTNO
 I $D(^VAS(393,$P(DGJTEDT,"^",2),"DT")) S DGJTNDT=^VAS(393,$P(DGJTEDT,"^",2),"DT")
 I '$D(^VAS(393,$P(DGJTEDT,"^",2),"DT")) S DGJTNDT="^^^^^^^^^^"
 S X=$P(^VAS(393,$P(DGJTEDT,"^",2),0),"^",6) S DGJTDEL=$S($D(^DG(40.8,+X,"DT")):^("DT"),1:DGJTDEL)
 S DGJTFL=0,DGJTHDR="INCOMPLETE RECORDS TRACKING "_$S($D(DGJTVIEW):"<View>",1:"<Edit>"),$P(DGJTCL,"=",81)="",DGJTNM=$P(^DPT(+DGJTNO,0),"^",1) D PID^VADPT6 S DGJTPTID=VA("PID") K VA
 S RTE=DFN_";DPT(",RTYPE=1 D LATEST^RTUTL3
 K ^TMP("DGJRPT",$J)
 S X="",(VALMCNT,DGJCNT)=0,VALMBG=1
 S X=$$SETSTR^VALM1(DGJTHDR,X,25,$L(DGJTHDR)) D TMP
 S X=""
 S X=$$SETSTR^VALM1("1)",X,1,2)
 S X=$$SETSTR^VALM1("2)",X,42,2) D TMP
 S X=""
 S DGJVAL=$P(DGJTNO,"^",2) S DGJVAL=$S($D(^VAS(393.3,+DGJVAL,0)):$P(^VAS(393.3,+DGJVAL,0),"^",1),1:"")
 S X=$$SETSTR^VALM1(" *Type of Deficiency: ",X,1,22)
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 S DGJVAL="          "_$S('$D(^XUSEC("DGJ TS UPDATE",DUZ))&($P(DGJTNO,"^",2)=$O(^VAS(393.3,"B","DISCHARGE SUMMARY",0)))&('$D(DGJTVIEW)):"*",1:" ")_"Specialty: "
 S X=$$SETSTR^VALM1(DGJVAL,X,42,21)
 S DGJVAL=$P(DGJTNO,"^",7) S DGJVAL=$S($D(^DIC(45.7,+DGJVAL,0)):$P(^(0),"^"),1:"")
 S X=$$SETSTR^VALM1(DGJVAL,X,64,17) D TMP
 S X=""
 S DGJVAL="         "_$S($P(DGJTNO,"^",2)=1&('$D(DGJTVIEW)):"*",1:" ")_"Event Date: "
 S X=$$SETSTR^VALM1(DGJVAL,X,1,22)
 S DGJVAL=$P(DGJTNO,"^",3),Y=DGJVAL I DGJVAL]"" X ^DD("DD") S DGJVAL=Y
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 S DGJVAL="  "_$S('$D(^XUSEC("DGJ TS UPDATE",DUZ))&($P(DGJTNO,"^",2)=$O(^VAS(393.3,"B","DISCHARGE SUMMARY",0)))&('$D(DGJTVIEW)):"*",1:" ")_"Primary Physician: "
 S X=$$SETSTR^VALM1(DGJVAL,X,42,21)
 S DGJVAL=$P(DGJTNO,"^",9) S DGJVAL=$S($D(^VA(200,+DGJVAL,0)):$P(^(0),"^"),1:"")
 S X=$$SETSTR^VALM1(DGJVAL,X,64,17) D TMP
 S X="",DGJVAL="          "_$S('$D(DGJTVIEW):"*",1:"")_"Admission: "
 S X=$$SETSTR^VALM1(DGJVAL,X,1,22)
 I $P(DGJTNO,"^",4)]"" S DGJVAL=$P(DGJTNO,"^",4) S Y=$S($D(^DGPM(+DGJVAL,0)):+^DGPM(DGJVAL,0),1:"") X ^DD("DD") S DGJVAL=Y
 I $P(DGJTNO,"^",4)']"" S DGJVAL="OUTPATIENT"
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 I $P(DGJTDEL,"^",3)=1!($P(DGJTDEL,"^",3)=0&($P(DGJTDEL,"^",10)="A")) S DGJVAL=$S('$D(^XUSEC("DGJ TS UPDATE",DUZ))&($P(DGJTNO,"^",2)=$O(^VAS(393.3,"B","DISCHARGE SUMMARY",0)))&('$D(DGJTVIEW)):"*",1:" ")_"Attending Physician: "
 I $P(DGJTDEL,"^",3)=1!($P(DGJTDEL,"^",3)=0&($P(DGJTDEL,"^",10)="A")) S X=$$SETSTR^VALM1(DGJVAL,X,42,21)
 I $P(DGJTDEL,"^",3)=1!($P(DGJTDEL,"^",3)=0&($P(DGJTDEL,"^",10)="A")) S DGJVAL=$P(DGJTNO,"^",10) S DGJVAL=$S($D(^VA(200,+DGJVAL,0)):$P(^(0),"^"),1:"")
 I $P(DGJTDEL,"^",3)=1!($P(DGJTDEL,"^",3)=0&($P(DGJTDEL,"^",10)="A")) S X=$$SETSTR^VALM1(DGJVAL,X,64,17) D TMP
 S X=""
 S X=$$SETSTR^VALM1("           *Division: ",X,1,22)
 S DGJVAL=$P(DGJTNO,"^",6) S DGJVAL=$S($D(^DG(40.8,+DGJVAL,0)):$P(^(0),"^",1),1:"")
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18) D TMP
 S DGJVAL=$P(DGJTNO,"^",5) S DGJVAL=$S($D(^SC(+DGJVAL,0)):$P(^(0),"^"),1:"")
 S DGJVAL="           "_$S($P(DGJTNO,"^",2)=1&('$D(DGJTVIEW)):"*",1:" ")_"Location: "
 S X=""
 S X=$$SETSTR^VALM1(DGJVAL,X,1,22)
 S DGJVAL=$P(DGJTNO,"^",5) S DGJVAL=$S($D(^SC(+DGJVAL,0)):$P(^(0),"^"),1:"")
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 S DGJVAL=$P(RTDATA,"^",2)
 S X=$$SETSTR^VALM1("           *Borrower: ",X,42,21)
 S X=$$SETSTR^VALM1(DGJVAL,X,63,18) D TMP
 S DGJVAL=$P(DGJTNO,"^",8)
 S DGJVAL=$S($D(^DG(393.1,+DGJVAL,0)):$P(^(0),"^",1),1:"")
 S X=""
 S X=$$SETSTR^VALM1("            *Service: ",X,1,22)
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 S DGJVAL=$P(RTDATA,"^",3)
 S X=$$SETSTR^VALM1("           *Phone/Rm: ",X,42,21)
 S X=$$SETSTR^VALM1(DGJVAL,X,63,18) D TMP
 S X=""
 S X=$$SETSTR^VALM1("   Phys. Responsible: ",X,1,22)
 S DGJVAL=$P(DGJTNO,"^",12) S DGJVAL=$S($D(^VA(200,+DGJVAL,0)):$P(^(0),"^"),1:"")
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18)
 S DGJVAL=$P(RTDATA,"^",4),Y=DGJVAL I DGJVAL]"" X ^DD("DD") S DGJVAL=Y
 S X=$$SETSTR^VALM1("       *Date Charged: ",X,42,21)
 S X=$$SETSTR^VALM1(DGJVAL,X,63,18) D TMP
 K RTE,RTYPE,RTDATA
 D CODDT^DGJTVW,CODBY^DGJTVW
 S X=""
 S X=$$SETSTR^VALM1("3)",X,1,2) D TMP
 S X=""
 S X=$$SETSTR^VALM1("              Status: ",X,1,22)
 S DGJVAL=$P(DGJTNO,"^",11) S DGJVAL=$S($D(^DG(393.2,+DGJVAL,0)):$P(^DG(393.2,DGJVAL,0),"^",1),1:"NOT SPECIFIED")
 S X=$$SETSTR^VALM1(DGJVAL,X,23,18) D TMP
 I '$D(^VAS(393,$P(DGJTEDT,"^",2),"MSG")) S X="",X=$$SETSTR^VALM1("4)",X,1,2) D TMP S X="",X=$$SETSTR^VALM1("Comments:",X,1,9) D TMP,DISP Q
 D COM^DGJTVW
DISP S:'$D(DGJTVIEW) X="",X=$$SETSTR^VALM1("* For display only!",X,1,19) D:'$D(DGJTVIEW) TMP Q
TMP S DGJCNT=DGJCNT+1,VALMCNT=VALMCNT+1
 S ^TMP("DGJRPT",$J,DGJCNT,0)=X,^TMP("DGJRPT",$J,"IDX",VALMCNT,DGJCNT)=""
 S ^TMP("RPTIDX",$J,DGJCNT)=VALMCNT
 Q