source: FOIAVistA/trunk/r/SURGERY-SR/SROACTH1.m@ 1611

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1SROACTH1 ;B'HAM ISC/SJA - CARDIAC CATH INFO (PAGE 2) ; [ 08/05/04 9:50 AM ]
2 ;;3.0; Surgery ;**125**;24 Jun 93
3 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
4 S SRSOUT=0 D ^SROAUTL
5START G:SRSOUT END
6 ;
7EDIT N M,I,SRZ,SROFL S SRR=0 S SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL
8 S SROFL=0 D REDO K DA,DIC,DIQ,DR,SRY S SRQ=0
9 I SROFL=0 S (DR,SRDR)="361;362.1;362.2;362.3;478;479;480"
10 I SROFL=1 S (DR,SRDR)="361;362.1;362.2;362.3"
11 S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="IE",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
12 S SRZ=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
13 .D TR,GET
14 .S SRZ=SRZ+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRZ(SRZ))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
15 .W:SRZ=1 !,"----- Native Coronaries -----"
16 .W:SRZ=5 !!,"If a Re-do, indicate stenosis in graft to:"
17 .W !,$J(SRZ,1)_". "_$P(Z,"^")_":",?32,SREXT
18 W !! F K=1:1:80 W "-"
19 D SEL G:SRR=1 EDIT
20 S SRSOUT=1 G END
21 Q
22SEL S SRSOUT=0 W !!,"Select Cardiac Catheterization and Angiographic Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
23 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
24 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
25 I X="A" S X="1:"_SRZ
26 I X?1.2N1":"1.2N D RANGE S SRR=1 Q
27 I $D(SRZ(X)),+X=X S EMILY=X D S SRR=1
28 .I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
29 Q
30HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
31 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),"^")_".)"
32 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.)",!
33 I $D(SRFLG) W !,"4. Enter '@' to delete information from all items.",!
34PRESS 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
35 Q
36RANGE ; range of numbers
37 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
38 .S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
39 Q
40ONE ; edit one item
41 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
42 Q
43TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
44 Q
45GET S X=$T(@J)
46 Q
47REDO I $P($G(^SRF(SRTN,206)),"^",15)=0!($P($G(^SRF(SRTN,206)),"^",42)=2) D
48 .K DA,DIE,DR S DA=SRTN,DIE=130,DR="478////NS"_";479////NS"_";480////NS" D ^DIE K DA,DIE,DR
49 .S SROFL=1
50 Q
51END W @IOF D ^SRSKILL
52 Q
53CFA ;;361^Left main stenosis
54CFBPA ;;362.1^LAD Stenosis
55CFBPB ;;362.2^Right coronary stenosis
56CFBPC ;;362.3^Circumflex Stenosis
57DGH ;;478^LAD
58DGI ;;479^Right coronary
59DHJ ;;480^Circumflex
Note: See TracBrowser for help on using the repository browser.