source: FOIAVistA/tag/r/SURGERY-SR/SROACR2.m@ 1154

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

WorldVistAEHR overlayed on FOIAVistA

File size: 2.9 KB
Line 
1SROACR2 ;BIR/SJA - OPERATIVE DATA, PAGE 2 ;04/12/06
2 ;;3.0; Surgery ;**125,153,160**;24 Jun 93;Build 7
3 ;
4 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
5 S SRSOUT=0 D ^SROAUTL
6START G:SRSOUT END
7 ;
8EDIT S SRR=0 S SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL W "Indicate other cardiac procedures only if done with cardiopulmonary bypass",! F K=1:1:80 W "-"
9 ;
10 K DR S SRQ=0,(DR,SRDR)="381;382;451;450;468;469"
11 K DA,DIC,DIQ,SRY S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="IE",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
12 K SRX S SRX=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
13 .K SREXT D TR,GET
14 .S SRX=SRX+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRX(SRX))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
15 .I SRFLD=451 W !,"Other Operative Data details:",!,"------------------------------"
16 .W !,$J(SRX,2)_". "_$P(Z,"^")_":" D EXT
17 .W:SRFLD=382 !
18 D CHCK 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 Operative 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(SRX(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>SRX)!(Y>Z) D HELP S SRR=1 Q
25 I X="A" S X="1:"_SRX
26 I X?1.2N1":"1.2N D RANGE S SRR=1 K SREXT Q
27 I $D(SRX(X)),+X=X S EMILY=X D S SRR=1
28 .I $$LOCK^SROUTL(SRTN) W ! D ONE,UNLOCK^SROUTL(SRTN)
29 Q
30EXT W ?30,SREXT
31 Q
32HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
33 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-6) to update the information in that field. (For",!," example, enter '5' to update Incision Type.)"
34 W !!,"3. Enter a range of numbers (1-6) separated by a ':' to enter a range of",!," information. (For example, enter '3:5' to enter Total CPB time,",!," Total Ischemic time, and Incision Type.)"
35 D RET
36 Q
37CHCK ; compare ischemic time to CPB time
38 I '$D(IORVON) S X="IORVON;IORVOFF" D ENDR^%ZISS
39 N SRISCH,SRCPB S SRISCH=SRY(130,SRTN,450,"E"),SRCPB=SRY(130,SRTN,451,"E")
40 I SRISCH,SRCPB,SRISCH>SRCPB W !,IORVON_"*** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***"_IORVOFF
41 Q
42RET Q:SRSOUT W ! K DIR S DIR(0)="E" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
43 Q
44RANGE ; range of numbers
45 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
46 .W ! S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
47 Q
48ONE ; edit one item
49 K DR,DA,DIE S DR=$P(SRX(EMILY),"^",2)_"T",DA=SRTN,DIE=130,SRDT=$P(SRX(EMILY),"^",3) S:SRDT DR=DR_";"_SRDT_"T" D ^DIE K DR,DA I $D(Y) S SRSOUT=1
50 I EMILY=3,$P($G(^SRF(SRTN,206)),"^",37)>0,($P($G(^SRF(SRTN,207)),"^",27)=1) S $P(^SRF(SRTN,207),"^",27)=5
51 Q
52TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
53 Q
54GET S X=$T(@J)
55 Q
56END W @IOF D ^SRSKILL
57 Q
58CHA ;;381^Foreign Body Removal
59CHB ;;382^Pericardiectomy
60DEA ;;451^Total CPB Time
61DEJ ;;450^Total Ischemic Time
62DFH ;;468^Incision Type
63DFI ;;469^Convert Off Pump to CPB
Note: See TracBrowser for help on using the repository browser.