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

MCARPCS2.m

Go to the documentation of this file.
MCARPCS2 ;WISC/TJK-AUTO TRANSMIT PACEMAKER REPORT-LOAD 2 ;6/29/92  15:15
 ;;2.3;Medicine;;09/13/1996
 G BEGIN
STORE S MCLN=$E($P(MCLN1,U)_"                                        ",1,40)_MCLN2
STORE1 S ^TMP("MCAR","PACE",$J,MCLNCT)=MCLN,MCLNCT=MCLNCT+1 Q
CENTER S MCLN=$E(MCBL,1,80-$L(Z)/2)_Z D STORE1 Q
BEGIN ;
 S MCLN1="             ATRIAL LEAD",MCLN2="VENTRICULAR LEAD" D STORE
 S MCLN1=$E(MCBL,1,13)_$E(MCDSH,1,$L("ATRIAL LEAD")),MCLN2=$E(MCDSH,1,$L("VENTRICULAR LEAD")) D STORE
 S (MCAL(0),MCVL(0))="" I MCAL S:$D(^MCAR(698.2,MCAL,0)) MCAL(0)=^(0)
 I MCVL S:$D(^MCAR(698.1,MCVL,0)) MCVL(0)=^(0)
 S (MA,MV)="" S MA=$P(MCAL(0),U,4) I MA,$D(^MCAR(698.6,MA,0)) S MA=$P(^(0),U)
 S MV=$P(MCVL(0),U,4) S MV=$P(MCVL(0),U,4) I MV,$D(^MCAR(698.6,MV,0)) S MV=$P(^(0),U)
 S MCLN1="MANUFACTURER: "_MA,MCLN2=MV D STORE
 S (MA,MV)="" S MA=$P(MCAL(0),U,3) I MA,$D(^MCAR(698.4,MA,0)) S MA=$P(^(0),U)
 S MV=$P(MCVL(0),U,3) I MV,$D(^MCAR(698.4,MV,0)) S MV=$P(^(0),U)
 S MCLN1="MODEL #:     "_MA,MCLN2=MV D STORE
 K MA,MV S MCLN1="SERIAL #:    "_$P(MCAL(0),U,5),MCLN2=$P(MCVL(0),U,5) D STORE
 S MCLN1="DATE:       ",MCLN2=""
 I MCAL S Y=+MCAL(0) I Y X ^DD("DD") S MCLN1=MCLN1_$P(Y,"@")
 I MCVL S Y=+MCVL(0) I Y X ^DD("DD") S MCLN2=$P(Y,"@")
 D STORE
 S MCLN=MCBL D STORE1 S MCLN=MCDSH D STORE1 S Z="PART 2" D CENTER K Z
 S MCLN=MCDSH D STORE1
 S VAOA("A")=1 D OAD^VADPT
 S MCLN1="ALTERNATE CONTACT",MCLN2="ALTERNATE CONTACT ADDRESS" D STORE
 S MCLN1=$E(MCDSH,1,$L("ALTERNATE CONTACT")),MCLN2=MCLN1_$E(MCDSH,1,8) D STORE
 S MCLN1=VAOA(9),MCLN2=VAOA(1) D STORE
 S MCLN1="RELATIONSHIP: "_VAOA(10),MCLAST=VAOA(4)_" ,"_$P(VAOA(5),U,2)_" "_VAOA(6)
 S MCLN2=$S(VAOA(2)'="":VAOA(2),1:MCLAST) K:MCLN2=MCLAST MCLAST
 D STORE
 S MCLN1="TELEPHONE: "_VAOA(8),MCLN2=$S(VAOA(3)'="":VAOA(3),$D(MCLAST):MCLAST,1:"") I $D(MCLAST),MCLN2=MCLAST K MCLAST
 D STORE,KVAR^VADPT
 S MCLN1="",MCLN2=$S($D(MCLAST):MCLAST,1:"") D:MCLN2'="" STORE
 S MCLN=MCBL D STORE1 S MCLN="TELEPHONE TRANSMITTER:" D STORE1
 S MCLN1="MANUFACTURER: ",MCLN2="MODEL #: "
 S MCTR=$P(MCG(1),U,4) I MCTR,$D(^MCAR(698.6,MCTR,0)) S MCTR=^(0),MCLN1=MCLN1_MCTR
 S MCTR=$P(MCG(1),U,3) I MCTR,$D(^MCAR(698.4,MCTR,0)) S MCTR=$P(^(0),U),MCLN2=MCLN2_MCTR
 D STORE K MCTR S MCLN=MCBL D STORE1
 S MCLN1="IMPLANT PARAMETERS:    ATRIAL LEAD",MCLN2="VENTRICULAR LEAD" D STORE
 S MCLN1=$E(MCDSH,1,19)_$E(MCBL,1,3)_$E(MCDSH,1,11),MCLN2=$E(MCDSH,1,16) D STORE
 S MCLN1="THRESHOLD IN VOLTS       "_$P(MCAL(0),U,6),MCLN2=$P(MCVL(0),U,6) D STORE
 S MCLN="THRESHOLD IN MAs" D STORE1
 S MCLN1=" AT .5 MS PW             "_$P(MCAL(0),U,7),MCLN2=$P(MCVL(0),U,7) D STORE
 S MCLN1="RESISTANCE AT 5 VOLTS    "_$P(MCAL(0),U,8),MCLN2=$P(MCVL(0),U,8) D STORE
 S MCLN="R-WAVE OR P-WAVE" D STORE1
 S MCLN1=" AMPLITUDE (MV)          "_$P(MCAL(0),U,9),MCLN2=$P(MCVL(0),U,9) D STORE
 S MCLN1="PSA USED:                ",MCLN2=""
 S M=$P(MCAL(0),U,10) I M,$D(^MCAR(698.4,M,0)) S MCLN1=MCLN1_$P(^(0),U)
 S M=$P(MCVL(0),U,10) I M,$D(^MCAR(698.4,M,0)) S MCLN2=$P(^(0),U)
 K M D STORE S MCLN=MCBL D STORE1
 G ^MCARPCS3