source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCARPACE.m@ 1154

Last change on this file since 1154 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1MCARPACE ;WISC/RMP,TJK-COMBINED GENERATOR,LEAD ENTER/EDIT ;5/2/96 13:02
2 ;;2.3;Medicine;**16,31**;09/13/1996
3 W @IOF,!!!,"COMBINED IMPLANT/LEADS PROCEDURES",!!!
4 S DIC="^MCAR(698,",DIC(0)="AELQM",(DLAYGO,DIDEL)=698
5 S DIC("A")="Enter Patient name or Date of Generator Implant: "
6 S DIC("DR")=".01;1//"_$G(MCPATNM)
7 D ^DIC G:Y<1 EXIT
8 S DFN=$P(^MCAR(698,+Y,0),U,2),DFNUM=$P(^MCAR(690,DFN,0),U,1),MCPATNM=$P(^DPT(DFNUM,0),"^",1)
9 W !,"Generator Information...."
10 S DIE=DIC,(DA,MCARGDA,MCARGDA1)=+Y,DR="2;4;6;S:$P(^(0),U,6)'=12 Y=7;6.1;7;12;14;19:601",MCFILE=698 S MCARGNUM=$$NUM(MCFILE) D IN^MCEO
11 G EXIT:$D(DTOUT)!$D(DUOUT) D ^DIE,OUT^MCEO,QTASK^MCPARAM G EXIT:$D(DUOUT),EXIT:$D(DTOUT) K DIC,DIE,DR,DA S MCSEL=$P(^MCAR(698,MCARGDA,0),U,7)
12 G @($S(MCSEL["A":"ALEAD",MCSEL["V":"VLEAD",1:"EXIT"))
13ALEAD W !,"Atrial Lead Data...." S (DLAYGO,MCFILE,DIDEL)=698.2 D LAST
14 S DIC="^MCAR(698.2,",DIC(0)="AELQM",DIC("DR")="1////^S X=DFN",DIC("S")="I $P(^(0),U,2)=DFN",DIC("B")=$P(^MCAR(698,MCARGDA,0),U)
15 D ^DIC K DIC("B"),DIC("S") G EXIT:$D(DUOUT)!($D(DTOUT)) G:Y<0 @$S(MCSEL["V":"VLEAD",1:"EXIT")
16 S DIE=DIC,(MCARGDA,DA)=+Y,DR="2;4:601",MCFILE=698.2 S MCARGNUM=$$NUM(MCFILE) D IN^MCEO G EXIT:$D(DTOUT)!$D(DUOUT) D ^DIE,OUT^MCEO,QTASK^MCPARAM K DIC,DIE,DR,DA
17 G @($S(MCSEL["V":"VLEAD",1:"EXIT"))
18VLEAD W !,"Ventricular Lead Data..." S (DLAYGO,MCFILE,DIDEL)=698.1 D LAST
19 S DIC="^MCAR(698.1,",DIC(0)="AEQLM",DIC("DR")="1////^S X=DFN",DIC("S")="I $P(^(0),U,2)=DFN",DIC("B")=$P(^MCAR(698,MCARGDA,0),U)
20 D ^DIC K DIC("B"),DIC("S") G EXIT:$D(DUOUT)!($D(DTOUT)),EXIT:Y<0
21 S DIE=DIC,(MCARGDA,DA)=+Y,DR="2;4:601",MCFILE=698.1 S MCARGNUM=$$NUM(MCFILE) D IN^MCEO G EXIT:$D(DTOUT)!$D(DUOUT) D ^DIE,OUT^MCEO,QTASK^MCPARAM K DIC,DIE,DR,DA
22 G EXIT
23GEN2 W !,"GENERATOR DATA..."
24 I $D(MCOEON) K MCORSV
25 S MCFILE=698,DIE="^MCAR(698,",(DA,MCARGDA)=MCARGDA1,DR="19:601" D ^DIE K DIC,DIE,DR,DA,MCARGDA1 D ORDER1,QTASK^MCPARAM
26EXIT K MCSEL,DFN,MCARGDA,DLAYGO,DIDEL,DFNUM Q
27NUM(MCFILE) ;
28 Q $O(^MCAR(697.2,"C","MCAR("_MCFILE,0))
29LAST S (Y,I)=0 F S I=$O(^MCAR(MCFILE,"C",DFN,I)) Q:I="" S X=+$G(^MCAR(MCFILE,I,0)) I X,X>Y S Y=X
30 I 'Y W !!,"No ",$S(MCFILE=698.1:"Ventricular",1:"Atrial")," Lead data entered for this patient",!! K I,Y,X Q
31 X ^DD("DD") W !!,"Last ",$S(MCFILE=698.1:"Ventricular",1:"Atrial")," Lead implanted on ",Y,!! K X,Y,I Q
32 ;
33DEM ; EDIT DEMOGRAPHIC INFORMATION ONLY
34 W @IOF,!!!,"DEMOGRAPHIC INFORMATION",!!!
35 ;S (DIC,DIE)="^MCAR(690,",DIC(0)="AEMQZ",DIC("B")=$G(MCPATNM)
36 S (DIC,DIE)="^MCAR(690,",DIC(0)="AELMQZ",DIC("B")=$G(MCPATNM),DLAYGO=690
37 D ^DIC
38 K DIC
39 IF Y'<0 D
40 . S MCPATNM=Y(0,0) ; new default name
41 . S DA=+Y,DR="[MCARPACEDIT]"
42 . D ^DIE
43 . Q
44 ;END IF
45 ;
46 QUIT
47 ;
48ORDER1 ;
49 Q:'$D(MCOEON) Q:'$D(^MCAR(MCFILE,MCARGDA)) Q:$D(DTOUT)
50 Q
Note: See TracBrowser for help on using the repository browser.