SROALN2 ;BIR/MAM - LAB INFO ;01/27/06
;;3.0; Surgery ;**38,88,100,153**;24 Jun 93;Build 11
S SRSOUT=0 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
D ^SROAUTL
START G:SRSOUT END K SRA,SRAO D ^SROALN3
ASK W !!,"Select Postoperative Laboratory Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 G END
I X="" Q
S:X="a" X="A" I '$D(SRAO(X)),(X'?.N1":".N),(X'="A") D HELP G:SRSOUT END G START
I X="A" S X="1:13"
I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>13)!(Y>Z) D HELP G:SRSOUT END G START
S SRPAGE="" D HDR^SROAUTL
I X?.N1":".N D RANGE G START
I $D(SRAO(X)) S EMILY=X D G START
.I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
END W @IOF
Q
HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-13) to update the information in that field. (For",!," example, enter '6' to update Highest Serum Creatinine)"
W !!,"3. Enter a range of numbers (1-13) separated by a ':' to enter a range of",!," information. (For example, enter '2:4' to update Highest Serum Sodium,",!," Lowest Serum Sodium, and Highest Potassium)"
W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
Q
RANGE ; range of numbers
I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
.S SRNOMORE=0,SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRNOMORE D ONE
Q
ONE ; edit one item
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
Q
RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROALN2 1804 printed Dec 13, 2024@02:40:50 Page 2
SROALN2 ;BIR/MAM - LAB INFO ;01/27/06
+1 ;;3.0; Surgery ;**38,88,100,153**;24 Jun 93;Build 11
+2 SET SRSOUT=0
IF '$DATA(SRTN)
WRITE !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue "
READ X:DTIME
GOTO END
+3 DO ^SROAUTL
START if SRSOUT
GOTO END
KILL SRA,SRAO
DO ^SROALN3
ASK WRITE !!,"Select Postoperative Laboratory Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
GOTO END
+1 IF X=""
QUIT
+2 if X="a"
SET X="A"
IF '$DATA(SRAO(X))
IF (X'?.N1":".N)
IF (X'="A")
DO HELP
if SRSOUT
GOTO END
GOTO START
+3 IF X="A"
SET X="1:13"
+4 IF X?.N1":".N
SET Y=$EXTRACT(X)
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>13)!(Y>Z)
DO HELP
if SRSOUT
GOTO END
GOTO START
+5 SET SRPAGE=""
DO HDR^SROAUTL
+6 IF X?.N1":".N
DO RANGE
GOTO START
+7 IF $DATA(SRAO(X))
SET EMILY=X
Begin DoDot:1
+8 IF $$LOCK^SROUTL(SRTN)
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot:1
GOTO START
END WRITE @IOF
+1 QUIT
HELP WRITE @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
+1 WRITE !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-13) to update the information in that field. (For",!," example, enter '6' to update Highest Serum Creatinine)"
+2 WRITE !!,"3. Enter a range of numbers (1-13) separated by a ':' to enter a range of",!," information. (For example, enter '2:4' to update Highest Serum Sodium,",!," Lowest Serum Sodium, and Highest Potassium)"
+3 WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
+4 QUIT
RANGE ; range of numbers
+1 IF $$LOCK^SROUTL(SRTN)
Begin DoDot:1
+2 SET SRNOMORE=0
SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
if SRNOMORE
QUIT
DO ONE
End DoDot:1
DO UNLOCK^SROUTL(SRTN)
+3 QUIT
ONE ; edit one item
+1 KILL DR,DIE
SET DA=SRTN
SET DR=$PIECE(SRAO(EMILY),"^",3)_"T;"_$PIECE(SRAO(EMILY),"^",4)_"T"
SET DIE=130
DO ^DIE
if $DATA(Y)
SET SRNOMORE=1
KILL DR
+2 QUIT
RET if SRSOUT
QUIT
WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 QUIT