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

MCARPACE.m

Go to the documentation of this file.
  1. MCARPACE ;WISC/RMP,TJK-COMBINED GENERATOR,LEAD ENTER/EDIT ;5/2/96 13:02
  1. ;;2.3;Medicine;**16,31**;09/13/1996
  1. W @IOF,!!!,"COMBINED IMPLANT/LEADS PROCEDURES",!!!
  1. S DIC="^MCAR(698,",DIC(0)="AELQM",(DLAYGO,DIDEL)=698
  1. S DIC("A")="Enter Patient name or Date of Generator Implant: "
  1. S DIC("DR")=".01;1//"_$G(MCPATNM)
  1. D ^DIC G:Y<1 EXIT
  1. S DFN=$P(^MCAR(698,+Y,0),U,2),DFNUM=$P(^MCAR(690,DFN,0),U,1),MCPATNM=$P(^DPT(DFNUM,0),"^",1)
  1. W !,"Generator Information...."
  1. 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
  1. 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)
  1. G @($S(MCSEL["A":"ALEAD",MCSEL["V":"VLEAD",1:"EXIT"))
  1. ALEAD W !,"Atrial Lead Data...." S (DLAYGO,MCFILE,DIDEL)=698.2 D LAST
  1. 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)
  1. D ^DIC K DIC("B"),DIC("S") G EXIT:$D(DUOUT)!($D(DTOUT)) G:Y<0 @$S(MCSEL["V":"VLEAD",1:"EXIT")
  1. 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
  1. G @($S(MCSEL["V":"VLEAD",1:"EXIT"))
  1. VLEAD W !,"Ventricular Lead Data..." S (DLAYGO,MCFILE,DIDEL)=698.1 D LAST
  1. 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)
  1. D ^DIC K DIC("B"),DIC("S") G EXIT:$D(DUOUT)!($D(DTOUT)),EXIT:Y<0
  1. 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
  1. G EXIT
  1. GEN2 W !,"GENERATOR DATA..."
  1. I $D(MCOEON) K MCORSV
  1. S MCFILE=698,DIE="^MCAR(698,",(DA,MCARGDA)=MCARGDA1,DR="19:601" D ^DIE K DIC,DIE,DR,DA,MCARGDA1 D ORDER1,QTASK^MCPARAM
  1. EXIT K MCSEL,DFN,MCARGDA,DLAYGO,DIDEL,DFNUM Q
  1. NUM(MCFILE) ;
  1. Q $O(^MCAR(697.2,"C","MCAR("_MCFILE,0))
  1. LAST 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
  1. I 'Y W !!,"No ",$S(MCFILE=698.1:"Ventricular",1:"Atrial")," Lead data entered for this patient",!! K I,Y,X Q
  1. X ^DD("DD") W !!,"Last ",$S(MCFILE=698.1:"Ventricular",1:"Atrial")," Lead implanted on ",Y,!! K X,Y,I Q
  1. ;
  1. DEM ; EDIT DEMOGRAPHIC INFORMATION ONLY
  1. W @IOF,!!!,"DEMOGRAPHIC INFORMATION",!!!
  1. ;S (DIC,DIE)="^MCAR(690,",DIC(0)="AEMQZ",DIC("B")=$G(MCPATNM)
  1. S (DIC,DIE)="^MCAR(690,",DIC(0)="AELMQZ",DIC("B")=$G(MCPATNM),DLAYGO=690
  1. D ^DIC
  1. K DIC
  1. IF Y'<0 D
  1. . S MCPATNM=Y(0,0) ; new default name
  1. . S DA=+Y,DR="[MCARPACEDIT]"
  1. . D ^DIE
  1. . Q
  1. ;END IF
  1. ;
  1. QUIT
  1. ;
  1. ORDER1 ;
  1. Q:'$D(MCOEON) Q:'$D(^MCAR(MCFILE,MCARGDA)) Q:$D(DTOUT)
  1. Q