[628] | 1 | MCARPCE ;WISC/TJK-ENTER/EDIT ROUTINE FOR PACEMAKER SURVEILLANCE ;5/2/96 08:54
|
---|
| 2 | ;;2.3;Medicine;**31**;09/13/1996
|
---|
| 3 | START S DIC="^MCAR(698.3,",DIC(0)="AEQLM",(MCFILE,DLAYGO,DIDEL)=698.3,DIC("DR")=".01;1//"_$G(MCPATNM)
|
---|
| 4 | S DIC("A")="Enter Patient Name, or Date and Time: "
|
---|
| 5 | S DIC("B")=$G(MCPATNM)
|
---|
| 6 | W @IOF,"SURVEILLANCE PROCEDURES"
|
---|
| 7 | I $G(DJSC) W " *** SCREEN EDIT ***"
|
---|
| 8 | E I $G(MCBL)=1 W " *** BRIEF EDIT ***"
|
---|
| 9 | W !!!
|
---|
| 10 | D ^DIC G EXIT:Y<0 S MCARGDA=+Y S MCARNEW="" S:$P(Y,U,3) MCARNEW=1
|
---|
| 11 | S (MCARNAM,DFN)=$P(^MCAR(698.3,+Y,0),U,2)
|
---|
| 12 | I 'MCARNAM S MCARNEW=1 D KILL G EXIT
|
---|
| 13 | I '$D(^MCAR(698,"C",MCARNAM)) D MSG G EXIT
|
---|
| 14 | ; Get new default patient name
|
---|
| 15 | S MCX=$$VALUE^MCENDIQ1(MCFILE,+Y,1)
|
---|
| 16 | I MCX'="" S MCPATNM=MCX
|
---|
| 17 | ; Get most recent procedure
|
---|
| 18 | F I=0:0 S I=$O(^MCAR(690,"AC",MCARNAM,I)) Q:I="" Q:$O(^(I,0))="MCAR(698"
|
---|
| 19 | I I="" D MSG G EXIT
|
---|
| 20 | S MCARGEN=$O(^MCAR(690,"AC",MCARNAM,I,"MCAR(698",0)) I 'MCARGEN D MSG G EXIT
|
---|
| 21 | I '$D(^MCAR(698,MCARGEN,0)) D MSG G EXIT
|
---|
| 22 | I $D(^MCAR(698,MCARGEN,1)),$P(^(1),U,1) D MSG G EXIT
|
---|
| 23 | I $P(^MCAR(698,MCARGEN,0),U,7)="" W !!,*7,"TYPE OF LEAD NOT DEFINED FOR THIS PATIENT IN GENERATOR FILE",!! R "PRESS RETURN TO CONTINUE: ",X:DTIME D KILL G EXIT
|
---|
| 24 | S MCARLEAD=$P(^MCAR(698,MCARGEN,0),U,7)
|
---|
| 25 | S DIE="^MCAR(698.3,",DR=3,DA=MCARGDA D ^DIE G EXIT:$D(Y),EXIT:$D(DTOUT)
|
---|
| 26 | S MCARFLG=$S($P(^MCAR(698.3,DA,0),U,4)["T":1,1:"")
|
---|
| 27 | G SCREEN1:$D(DJSC) S DR=$S($G(MCBL)=1:"[MCARPACSURVBRIEF]",1:"[MCARPACSURV]"),DA=MCARGDA,MCFILE=698.3 D ORDERA G EXIT:$D(DUOUT)!$D(DTOUT) D ^DIE,ORDER1,QTASK^MCPARAM
|
---|
| 28 | EXIT K %,%X,%Y,%Y2,C,D0,DA,DI,DJSC,DQ,DR,DZ,I,J,MCARFLG,MCARGDA,MCARGEN,MCARLEAD,MCARNAM,MCX,X,Y,DLAYGO,DIDEL,MCFILE,MCARNEW D EXIT^MCARGE Q
|
---|
| 29 | ORDERA S MCARGNUM=$O(^MCAR(697.2,"C","MCAR("_MCFILE,0))
|
---|
| 30 | ORDER D:'$D(MCOEON) ORDER^MCPARAM Q:'$D(MCOEON)
|
---|
| 31 | Q
|
---|
| 32 | ORDER1 G IM:'$D(MCOEON) Q:'$D(^MCAR(MCFILE,MCARGDA)) Q:$D(DTOUT)
|
---|
| 33 | IM D EN1^MCMAG Q
|
---|
| 34 | SCREEN K DJSC
|
---|
| 35 | S (DJSC,MCARGNUM)=$O(^MCAR(697.2,"BA","PACEMAKER SURVEILLANCE",0))
|
---|
| 36 | G EXIT:DJSC="",START
|
---|
| 37 | SCREEN1 S DJDN=MCARGDA,DJSC=$S($G(MCBS)=1:"MCPACSURVBR",1:"MCPACSUR"_$S(MCARFLG:"T",1:"C")_MCARLEAD)
|
---|
| 38 | D ORDERA G EXIT:$D(DTOUT)!$D(DUOUT) D EN^MCARD,ORDER1,QTASK^MCPARAM
|
---|
| 39 | ;get new default patient name
|
---|
| 40 | S MCX=$$VALUE^MCENDIQ1(MCFILE,MCARGDA,1)
|
---|
| 41 | I MCX'="" S MCPATNM=MCX
|
---|
| 42 | G EXIT
|
---|
| 43 | MSG W !!,"PATIENT HAS NO CURRENT GENERATOR IMPLANT LISTED IN GENERATOR FILE",!! R "PRESS RETURN TO CONTINUE ",X:DTIME D KILL Q
|
---|
| 44 | KILL I MCARNEW S DIK="^MCAR(698.3,",DA=MCARGDA D ^DIK W !,*7,"Entry Deleted"
|
---|
| 45 | Q
|
---|