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

BNIRDSG.m

Go to the documentation of this file.
BNIRDSG ; IHS/CMI/LAB - record display ;
 ;;1.0;BNI CPHD ACTIVITY DATASYSTEM;;DEC 20, 2006
 ;
EN(BNIRIEN,BNIARRY,BNIGUI) ;EP
 I $G(BNIARRY)="" S BNIARRY="^TMP(""BNIVDSG"",$J)"
 Q:'$D(BNIRIEN)
 Q:'BNIRIEN
 Q:'$D(^BNIREC(BNIRIEN,0))
 S BNICTR=0
 D BUILD
 D XIT
 Q
 ;
SET ;set array
 S BNICTR=BNICTR+1
 S @BNIARRY@(BNICTR,0)=BNISTR
 S BNISTR=""
 Q
BUILD ; build array
 K BNIAR
 D TERM^VALM0
 I $G(BNIGUI) S (IOINHI,IOINORM)=""
 S BNIVREC=^BNIREC(BNIRIEN,0)
 S BNIH="Record IEN",BNIV=BNIRIEN D BUILD1
 S BNISTR="" D SET
VISIT ;
 S BNISTR="=============== "_IOINHI_"CPHAD ACTIVITY RECORD"_IOINORM_" ===============",X=(80-$L(BNISTR)\2) D SET ;$J("",X)_BNISTR D SET
 D ENP^XBDIQ1(90510,BNIRIEN,".01:1299","BNIAR(","E")
 S F=0 F  S F=$O(BNIAR(F)) Q:F'=+F  I BNIAR(F)]"" D
 .S BNIH=$P(^DD(90510,F,0),U)
 .S BNIV=BNIAR(F)
 .D BUILD1
 I $O(^BNIREC(BNIRIEN,14,0)) D
 .S BNISTR="" D SET
 .S BNIH=$P(^DD(90510,1400,0),U)
 .S BNIV="" D BUILD1
 .S F=0 F  S F=$O(^BNIREC(BNIRIEN,14,F)) Q:F'=+F  D
 ..S BNISTR=$G(^BNIREC(BNIRIEN,14,F,0)) D SET
 S BNISTR="" D SET
 ;Q:'$P(BNIVREC,U,9)
NFT ;
 S BNISTR="Record Edited by:" D SET
 K BNIAR S Y=0 F  S Y=$O(^BNIREC(BNIRIEN,15,Y)) Q:Y'=+Y  D
 .S %=$$FMTE^XLFDT($P(^BNIREC(BNIRIEN,15,Y,0),U))
 .S J=$P(^BNIREC(BNIRIEN,15,Y,0),U,2),J=$P($G(^VA(200,+J,0)),U)
 .S BNISTR=%_"   "_J D SET
 S BNISTR="" D SET
 Q
BUILD1 ;
 I $D(BNINARR) S BNISTR="",BNISTR=$$SETSTR^VALM1(BNIV,BNISTR,1,$L(BNIV)) D SET Q
 S BNISTR=$E(BNIH,1,23)_":",BNISTR=$$SETSTR^VALM1(BNIV,BNISTR,26,$L(BNIV))
 D SET
 Q
 I $L(BNISTR)>39 D SET
 S BNIV=" "_BNIV_" ",X=BNIH_": "_BNIV
 I $L(BNISTR),$L(X)>40 D SET
 I $L(BNISTR) S BNISTR=$$SETSTR^VALM1(X,BNISTR,40,$L(X))
 I '$L(BNISTR) S BNISTR=X
 K BNIV,BNIH,X
 Q
XIT ;
 K BNIAR,BNIARRY,BNICTR,BNIH,BNISTR,BNIV,BNIVDFN,BNIVDG,BNIVFLE,BNIVI,BNIRIEN,BNIVIGR,BNIFL,BNIVNM,BNIVREC,BNIH,BNINARR
 K DO,D0,DA,DI,DIC,DIQ,DR,F,X,Y,Z,F1
 Q