source: WorldVistAEHR/trunk/r/SURGERY-SR/SROALEN.m@ 623

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1SROALEN ;BIR/MAM - LAB INFO ;01/27/06
2 ;;3.0; Surgery ;**38,100,125,153,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 S SRSOUT=0 D ^SROAUTL
5START G:SRSOUT END K SRA,SRAO D ^SROALN1,^SROALDP
6ASK W !!,"Select Preoperative Laboratory Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 D CONCC G END
7 I X="" D CONCC,^SROALN2 G END
8 S:X="a" X="A" I '$D(SRAO(X)),(X'?.N1":".N),(X'="A") D HELP G:SRSOUT END G START
9 I X="A" S X="1:15"
10 I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>15)!(Y>Z) D HELP G:SRSOUT END G START
11 S SRPAGE="" D HDR^SROAUTL
12 I X?.N1":".N D RANGE G START
13 I $D(SRAO(X)) S EMILY=X D G START
14 .I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
15END W @IOF
16 Q
17HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
18 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-15) to update the information in that field. (For",!," example, enter '3' to update Preoperative BUN)"
19 W !!,"3. Enter a range of numbers (1-15) separated by a ':' to enter a range of",!," information. (For example, enter '2:4' to update Serum Sodium,",!," BUN, and Serum Creatinine)"
20 W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
21 Q
22RANGE ; range of numbers
23 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
24 .S SRNOMORE=0,SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRNOMORE D ONE
25 Q
26ONE ; edit one item
27 I EMILY>15 K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",4)_"T;"_$P(SRAO(EMILY),"^",5)_"T;"_$P(SRAO(EMILY),"^",6)_"T",DIE=130 D ^DIE S:$D(Y) SRNOMORE=1 K DR Q
28 K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",3)_"T;"_$P(SRAO(EMILY),"^",4)_"T",DIE=130 D ^DIE S:$D(Y) SRNOMORE=1 K DR
29 Q
30RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
31 Q
32CONCC ; check for concurrent case and update if one exists
33 Q:'$$LOCK^SROUTL(SRTN)
34 S SRCON=$P($G(^SRF(SRTN,"CON")),"^") Q:'SRCON
35 S SRI="" F S SRI=$O(SRAO(SRI)) Q:SRI="" S S1=$P(SRAO(SRI),"^",3),S2=$P(SRAO(SRI),"^",4) K DA,DIC,DIQ,DR,SRY D
36 .S DA=SRTN,DR=S1_";"_S2,DIC="^SRF(",DIQ="SRY",DIQ(0)="I" D EN^DIQ1 S P1=SRY(130,SRTN,S1,"I") S:P1="" P1="@" S P2=SRY(130,SRTN,S2,"I") S:P2="" P2="@"
37 .K DA,DIE,DR S DA=SRCON,DIE=130,DR=S1_"////"_P1_";"_S2_"////"_P2 D ^DIE K DR
38 D UNLOCK^SROUTL(SRTN)
39 Q
Note: See TracBrowser for help on using the repository browser.