SROACTH1 ;B'HAM ISC/SJA - CARDIAC CATH INFO (PAGE 2) ; [ 08/05/04 9:50 AM ]
;;3.0; Surgery ;**125**;24 Jun 93
I '$D(SRTN) W !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END
S SRSOUT=0 D ^SROAUTL
START G:SRSOUT END
;
EDIT N M,I,SRZ,SROFL S SRR=0 S SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL
S SROFL=0 D REDO K DA,DIC,DIQ,DR,SRY S SRQ=0
I SROFL=0 S (DR,SRDR)="361;362.1;362.2;362.3;478;479;480"
I SROFL=1 S (DR,SRDR)="361;362.1;362.2;362.3"
S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="IE",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
S SRZ=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
.D TR,GET
.S SRZ=SRZ+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRZ(SRZ))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
.W:SRZ=1 !,"----- Native Coronaries -----"
.W:SRZ=5 !!,"If a Re-do, indicate stenosis in graft to:"
.W !,$J(SRZ,1)_". "_$P(Z,"^")_":",?32,SREXT
W !! F K=1:1:80 W "-"
D SEL G:SRR=1 EDIT
S SRSOUT=1 G END
Q
SEL S SRSOUT=0 W !!,"Select Cardiac Catheterization and Angiographic Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q:X="" S:X="a" X="A" I '$D(SRFLG),'$D(SRZ(X)),(X'?1.2N1":"1.2N),X'="A" D HELP S SRR=1 Q
I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRZ)!(Y>Z) D HELP S SRR=1 Q
I X="A" S X="1:"_SRZ
I X?1.2N1":"1.2N D RANGE S SRR=1 Q
I $D(SRZ(X)),+X=X S EMILY=X D S SRR=1
.I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
Q
HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
W !!,"1. Enter 'A' to update all items.",!!,"2. Enter a number (1-"_SRZ_") to update an individual item. (For example,",!," enter '1' to update "_$P(SRZ(1),"^")_".)"
W !!,"3. Enter a range of numbers (1-"_SRZ_") separated by a ':' to enter a range",!," of items. (For example, enter '1:3' to update items Left main stenosis, ",!," LAD Stenosis and Right coronary stenosis.)",!
I $D(SRFLG) W !,"4. Enter '@' to delete information from all items.",!
PRESS W ! K DIR S DIR("A")="Press the return key to continue or '^' to exit: ",DIR(0)="FOA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
RANGE ; range of numbers
I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
.S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
Q
ONE ; edit one item
K DR,DA,DIE S DR=$P(SRZ(EMILY),"^",2)_"T",DA=SRTN,DIE=130,SRDT=$P(SRZ(EMILY),"^",3) S:SRDT DR=DR_";"_SRDT_"T" D ^DIE K DR,DA I $D(Y) S SRSOUT=1
Q
TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
Q
GET S X=$T(@J)
Q
REDO I $P($G(^SRF(SRTN,206)),"^",15)=0!($P($G(^SRF(SRTN,206)),"^",42)=2) D
.K DA,DIE,DR S DA=SRTN,DIE=130,DR="478////NS"_";479////NS"_";480////NS" D ^DIE K DA,DIE,DR
.S SROFL=1
Q
END W @IOF D ^SRSKILL
Q
CFA ;;361^Left main stenosis
CFBPA ;;362.1^LAD Stenosis
CFBPB ;;362.2^Right coronary stenosis
CFBPC ;;362.3^Circumflex Stenosis
DGH ;;478^LAD
DGI ;;479^Right coronary
DHJ ;;480^Circumflex
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROACTH1 2992 printed Nov 22, 2024@17:50:20 Page 2
SROACTH1 ;B'HAM ISC/SJA - CARDIAC CATH INFO (PAGE 2) ; [ 08/05/04 9:50 AM ]
+1 ;;3.0; Surgery ;**125**;24 Jun 93
+2 IF '$DATA(SRTN)
WRITE !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue "
READ X:DTIME
GOTO END
+3 SET SRSOUT=0
DO ^SROAUTL
START if SRSOUT
GOTO END
+1 ;
EDIT NEW M,I,SRZ,SROFL
SET SRR=0
SET SRPAGE="PAGE: 2 OF 2"
DO HDR^SROAUTL
+1 SET SROFL=0
DO REDO
KILL DA,DIC,DIQ,DR,SRY
SET SRQ=0
+2 IF SROFL=0
SET (DR,SRDR)="361;362.1;362.2;362.3;478;479;480"
+3 IF SROFL=1
SET (DR,SRDR)="361;362.1;362.2;362.3"
+4 SET DIC="^SRF("
SET DA=SRTN
SET DIQ="SRY"
SET DIQ(0)="IE"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+5 SET SRZ=0
FOR M=1:1
SET I=$PIECE(SRDR,";",M)
if 'I
QUIT
Begin DoDot:1
+6 DO TR
DO GET
+7 SET SRZ=SRZ+1
SET Y=$PIECE(X,";;",2)
SET SRFLD=$PIECE(Y,"^")
SET (Z,SRZ(SRZ))=$PIECE(Y,"^",2)_"^"_SRFLD
SET SREXT=SRY(130,SRTN,SRFLD,"E")
+8 if SRZ=1
WRITE !,"----- Native Coronaries -----"
+9 if SRZ=5
WRITE !!,"If a Re-do, indicate stenosis in graft to:"
+10 WRITE !,$JUSTIFY(SRZ,1)_". "_$PIECE(Z,"^")_":",?32,SREXT
End DoDot:1
+11 WRITE !!
FOR K=1:1:80
WRITE "-"
+12 DO SEL
if SRR=1
GOTO EDIT
+13 SET SRSOUT=1
GOTO END
+14 QUIT
SEL SET SRSOUT=0
WRITE !!,"Select Cardiac Catheterization and Angiographic Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 if X=""
QUIT
if X="a"
SET X="A"
IF '$DATA(SRFLG)
IF '$DATA(SRZ(X))
IF (X'?1.2N1":"1.2N)
IF X'="A"
DO HELP
SET SRR=1
QUIT
+2 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRZ)!(Y>Z)
DO HELP
SET SRR=1
QUIT
+3 IF X="A"
SET X="1:"_SRZ
+4 IF X?1.2N1":"1.2N
DO RANGE
SET SRR=1
QUIT
+5 IF $DATA(SRZ(X))
IF +X=X
SET EMILY=X
Begin DoDot:1
+6 IF $$LOCK^SROUTL(SRTN)
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot:1
SET SRR=1
+7 QUIT
HELP WRITE @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
+1 WRITE !!,"1. Enter 'A' to update all items.",!!,"2. Enter a number (1-"_SRZ_") to update an individual item. (For example,",!," enter '1' to update "_$PIECE(SRZ(1),"^")_".)"
+2 WRITE !!,"3. Enter a range of numbers (1-"_SRZ_") separated by a ':' to enter a range",!," of items. (For example, enter '1:3' to update items Left main stenosis, ",!," LAD Stenosis and Right coronary stenosis.)",!
+3 IF $DATA(SRFLG)
WRITE !,"4. Enter '@' to delete information from all items.",!
PRESS WRITE !
KILL DIR
SET DIR("A")="Press the return key to continue or '^' to exit: "
SET DIR(0)="FOA"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT
RANGE ; range of numbers
+1 IF $$LOCK^SROUTL(SRTN)
Begin DoDot:1
+2 SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
if SRSOUT
QUIT
DO ONE
End DoDot:1
DO UNLOCK^SROUTL(SRTN)
+3 QUIT
ONE ; edit one item
+1 KILL DR,DA,DIE
SET DR=$PIECE(SRZ(EMILY),"^",2)_"T"
SET DA=SRTN
SET DIE=130
SET SRDT=$PIECE(SRZ(EMILY),"^",3)
if SRDT
SET DR=DR_";"_SRDT_"T"
DO ^DIE
KILL DR,DA
IF $DATA(Y)
SET SRSOUT=1
+2 QUIT
TR SET J=I
SET J=$TRANSLATE(J,"1234567890.","ABCDEFGHIJP")
+1 QUIT
GET SET X=$TEXT(@J)
+1 QUIT
REDO IF $PIECE($GET(^SRF(SRTN,206)),"^",15)=0!($PIECE($GET(^SRF(SRTN,206)),"^",42)=2)
Begin DoDot:1
+1 KILL DA,DIE,DR
SET DA=SRTN
SET DIE=130
SET DR="478////NS"_";479////NS"_";480////NS"
DO ^DIE
KILL DA,DIE,DR
+2 SET SROFL=1
End DoDot:1
+3 QUIT
END WRITE @IOF
DO ^SRSKILL
+1 QUIT
CFA ;;361^Left main stenosis
CFBPA ;;362.1^LAD Stenosis
CFBPB ;;362.2^Right coronary stenosis
CFBPC ;;362.3^Circumflex Stenosis
DGH ;;478^LAD
DGI ;;479^Right coronary
DHJ ;;480^Circumflex