source: FOIAVistA/trunk/r/SURGERY-SR/SROACAR.m@ 765

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1SROACAR ;BIR/MAM - OPEATIVE DATA ;12/03/07
2 ;;3.0; Surgery ;**38,71,93,95,100,125,142,153,166**;24 Jun 93;Build 6
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 SRACLR=0,SRSOUT=0,SRSUPCPT=1 D ^SROAUTL
5START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROACR1
6ASK W !,"Select Cardiac Procedures Operative Information to Edit: " R X:DTIME I '$T!("^"[X) G END
7 S X=$S(X="a":"A",X="n":"N",1:X) I '$D(SRAO(X)),(X'?.N1":".N),(X'="A"),(X'="N") D HELP G:SRSOUT END G START
8 I X="A" S X="1:22"
9 I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>22)!(Y>Z) D HELP G:SRSOUT END G START
10 I X="N" D G:SRSOUT END G START
11 .W ! K DIR S DIR(0)="Y",DIR("B")="NO",DIR("A")="Are you sure you want to set all fields on this page to NO"
12 .D ^DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
13 .I Y D NO2ALL
14 D HDR^SROAUTL
15 I X?.N1":".N D RANGE G START
16 I $D(SRAO(X)),+X=X S EMILY=X D G START
17 .I $$LOCK^SROUTL(SRTN) W ! D ONE,UNLOCK^SROUTL(SRTN)
18 I $D(SRAO(X)) W ! S EMILY=X D G START
19 .I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
20END I 'SRSOUT D ^SROACR2
21 W @IOF D ^SRSKILL
22 Q
23HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
24 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter 'N' to set all fields on this page to NO."
25 W !!,"3. Enter a number (1-22) to update the information in that field. (For",!," example, enter '9' to update Valve Repair.)"
26 W !!,"4. Enter a range of numbers (1-22) separated by a ':' to enter a range of",!," information. (For example, enter '6:8' to enter Aortic Valve",!," Replacement, Mitral Valve Replacement, and Tricuspid Valve Replacement.)"
27 D RET
28 Q
29RANGE ; range of numbers
30 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
31 .W ! S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
32 Q
33ONE ; edit one item
34 ;I EMILY=16 D MIS^SROACR1 Q
35 I EMILY=22 D OPS Q
36 K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",2)_"T",DIE=130 D ^DIE K DR I $D(Y) S SRSOUT=1
37 I 'SRSOUT,EMILY=12!(EMILY=13) D OK
38 Q
39NO2ALL ; set all fields to NO
40 N II K DR,DIE S DA=SRTN,DIE=130
41 F II=367,368,369,371,481,483,376,380,378,377,379,373,372,505,502 S DR=$S($D(DR):DR_";",1:"")_II_"////N"
42 F II=365,366,464,465,416 S DR=DR_";"_II_"////0"
43 S DR=DR_";"_370_"////5"_";"_512_"////N"
44 D ^DIE K DR
45 Q
46OK N SRISCH,SRCPB S X=$G(^SRF(SRTN,206)),SRISCH=$P(X,"^",36),SRCPB=$P(X,"^",37)
47 I SRISCH,SRCPB,SRISCH>SRCPB W !!," *** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***",! D RET W !
48 Q
49RET Q:SRSOUT W ! K DIR S DIR(0)="E" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
50 Q
51OPS ; enter other cardiac procedures, specify
52 S DIE=130,DA=SRTN,DR="502T" D ^DIE K DR Q:$D(Y)
53 I X'="Y" K ^SRF(SRTN,209.1) Q
54 S DIE=130,DA=SRTN,DR="484T" D ^DIE K DR
55 Q
Note: See TracBrowser for help on using the repository browser.