source: WorldVistAEHR/trunk/r/SURGERY-SR/SROAOUT.m@ 1356

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1SROAOUT ;BIR/SJA - OUTCOMES DATA ;04/03/07
2 ;;3.0; Surgery ;**125,135,142,160**;24 Jun 93;Build 7
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 D SRA^SROES S SRACLR=0,SRSOUT=0,SRSUPCPT=1 D ^SROAUTL
5START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROUTC
6ASK W !!,"Select Outcomes Information to Edit: " R X:DTIME I '$T!("^"[X) G END
7 S:X="a" X="A" I '$D(SRAO(X)),(X'?.N1":".N),(X'="A") D HELP G:SRSOUT END G START
8 I X="A" S X="0:13"
9 I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<0!(Z>13)!(Y>Z) D HELP G:SRSOUT END G START
10 D HDR^SROAUTL
11 I X?.N1":".N D RANGE G START
12 I $D(SRAO(X)) S EMILY=X D G START
13 .I $$LOCK^SROUTL(SRTN) W !! D ONE,UNLOCK^SROUTL(SRTN)
14END D:$D(SRTN) EXIT^SROES W @IOF D ^SRSKILL
15 Q
16HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
17 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (0-13) to update the information in that field. (For",!," example, enter '4' to update Mediastinitis)"
18 W !!,"3. Enter a range of numbers separated by a ':' to enter a range of",!," information. (For example, enter '11:13' to enter Stroke,",!," Coma >= 24 hr, and New Mech Circ Support)"
19 W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
20 Q
21RANGE ; range of numbers
22 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
23 .W !! S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
24 Q
25ONE ; edit one item
26 N SRBEF
27 S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="I",DR=$P(SRAO(EMILY),"^",2) D EN^DIQ1 K DA,DIC,DIQ,DR S SRBEF=SRY(130,SRTN,$P(SRAO(EMILY),"^",2),"I")
28 K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",2)_"T",DIE=130 D ^DIE K DA,DIE,DR I $D(Y)!$D(DTOUT) S SRSOUT=1
29 Q:'EMILY
30 I 'SRSOUT,SRBEF'="Y",X="Y" D UPDATE^SROUTC Q
31 I 'SRSOUT,SRBEF="Y",X="Y",EMILY=8 D K DA,DR,DIE Q
32 .N SROCC,SRSTAT S SROCC=0 F S SROCC=$O(^SRF(SRTN,16,SROCC)) Q:'SROCC I $P(^SRF(SRTN,16,SROCC,0),"^",2)=27 S SRSTAT=$P(^SRF(SRTN,16,SROCC,0),"^",5) Q
33 .K DIR S DIR(0)="130.22,8",DIR("A")="Cardiopulmonary Bypass Status",DA(1)=SRTN,DA=SROCC D ^DIR K DA,DR,DIE,DIR
34 .I ($G(SRSTAT)=""&((X="")!(X="@")!(X["^")))!(Y=0) D DEL^SROUTC S DA=SRTN,DIE=130,DR="391////N" D ^DIE Q
35 .I $G(SRSTAT)'="",X["^" Q
36 .I $G(SRSTAT)'=Y,Y'="" S DA=SROCC,DA(1)=SRTN,DIE="^SRF(SRTN,16,",DR="8////"_Y D ^DIE Q
37 I 'SRSOUT,SRBEF="Y",(X=""!(X="N")) D DEL^SROUTC
38 Q
39RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
40 Q
Note: See TracBrowser for help on using the repository browser.