SROACPM0 ;BIR/SJA - CARDIAC RESOURCE INFO ;05/05/15
;;3.0;Surgery;**184**;24 Jun 93;Build 35
;
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
S SRSOUT=0 D ^SROAUTL
START G:SRSOUT END
;
EDIT N DAYS,HOURS,MINS
S SRR=0 S SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL K DR S SRQ=0,(DR,SRDR)="670;671;673;674;677"
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
K SRZ S SRZ=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
.D TR,GET
.S SRZ=SRZ+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRZ(SRZ))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
.W:M>1 ! W $J(SRZ,2)_". "_$P(Z,"^")_": " D EXT
W !! F K=1:1:80 W "-"
D SEL G:SRR=1 EDIT
S SRSOUT=1 G END
Q
EXT ;
W ?39,$E(SREXT,1,40)
Q
SEL S SRSOUT=0 W !,"Select Resource Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q:X="" S:X="a" X="A" I '$D(SRFLG),'$D(SRZ(X)),(X'?1.2N1":"1.2N),X'="A" D HELP S SRR=1 Q
I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRZ)!(Y>Z) D HELP S SRR=1 Q
I X="A" S X="1:"_SRZ
I X?1.2N1":"1.2N D RANGE S SRR=1 Q
I $D(SRZ(X)),+X=X S EMILY=X D S SRR=1
.I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
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 items.",!!,"2. Enter a number (1-"_SRZ_") to update an individual item. (For example,",!," enter '1' to update "_$P(SRZ(1),"^")_".)"
W !!,"3. Enter a range of numbers (1-"_SRZ_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
I $D(SRFLG) W !,"4. Enter 'N' or 'NO' to enter negative response for all items.",!!,"5. Enter '@' to delete information from all items.",!
PRESS W ! K DIR S DIR("A")="Press the return key to continue or '^' to exit: ",DIR(0)="FOA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
RANGE ; range of numbers
I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
.S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
Q
ONE ; edit one item
K DR,DA,DIE S DR=$P(SRZ(EMILY),"^",2)_"T",DA=SRTN,DIE=130,SRDT=$P(SRZ(EMILY),"^",3) S:SRDT DR=DR_";"_SRDT_"T" D ^DIE K DR,DA I $D(Y) S SRSOUT=1
Q
TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
Q
GET S X=$T(@J)
Q
END W @IOF D ^SRSKILL
Q
FGJ ;;670^Current Residence
FGA ;;671^Ambulation Device
FGC ;;673^History of Cancer
FGD ;;674^History of Radiation Therapy
FGG ;;677^Num of Prior Surg in Same OP
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROACPM0 2594 printed Nov 22, 2024@17:50:15 Page 2
SROACPM0 ;BIR/SJA - CARDIAC RESOURCE INFO ;05/05/15
+1 ;;3.0;Surgery;**184**;24 Jun 93;Build 35
+2 ;
+3 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
+4 SET SRSOUT=0
DO ^SROAUTL
START if SRSOUT
GOTO END
+1 ;
EDIT NEW DAYS,HOURS,MINS
+1 SET SRR=0
SET SRPAGE="PAGE: 2 OF 2"
DO HDR^SROAUTL
KILL DR
SET SRQ=0
SET (DR,SRDR)="670;671;673;674;677"
+2 KILL DA,DIC,DIQ,SRY
SET DIC="^SRF("
SET DA=SRTN
SET DIQ="SRY"
SET DIQ(0)="IE"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+3 KILL SRZ
SET SRZ=0
FOR M=1:1
SET I=$PIECE(SRDR,";",M)
if 'I
QUIT
Begin DoDot:1
+4 DO TR
DO GET
+5 SET SRZ=SRZ+1
SET Y=$PIECE(X,";;",2)
SET SRFLD=$PIECE(Y,"^")
SET (Z,SRZ(SRZ))=$PIECE(Y,"^",2)_"^"_SRFLD
SET SREXT=SRY(130,SRTN,SRFLD,"E")
+6 if M>1
WRITE !
WRITE $JUSTIFY(SRZ,2)_". "_$PIECE(Z,"^")_": "
DO EXT
End DoDot:1
+7 WRITE !!
FOR K=1:1:80
WRITE "-"
+8 DO SEL
if SRR=1
GOTO EDIT
+9 SET SRSOUT=1
GOTO END
+10 QUIT
EXT ;
+1 WRITE ?39,$EXTRACT(SREXT,1,40)
+2 QUIT
SEL SET SRSOUT=0
WRITE !,"Select Resource Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 if X=""
QUIT
if X="a"
SET X="A"
IF '$DATA(SRFLG)
IF '$DATA(SRZ(X))
IF (X'?1.2N1":"1.2N)
IF X'="A"
DO HELP
SET SRR=1
QUIT
+2 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRZ)!(Y>Z)
DO HELP
SET SRR=1
QUIT
+3 IF X="A"
SET X="1:"_SRZ
+4 IF X?1.2N1":"1.2N
DO RANGE
SET SRR=1
QUIT
+5 IF $DATA(SRZ(X))
IF +X=X
SET EMILY=X
Begin DoDot:1
+6 IF $$LOCK^SROUTL(SRTN)
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot:1
SET SRR=1
+7 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 items.",!!,"2. Enter a number (1-"_SRZ_") to update an individual item. (For example,",!," enter '1' to update "_$PIECE(SRZ(1),"^")_".)"
+2 WRITE !!,"3. Enter a range of numbers (1-"_SRZ_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
+3 IF $DATA(SRFLG)
WRITE !,"4. Enter 'N' or 'NO' to enter negative response for all items.",!!,"5. Enter '@' to delete information from all items.",!
PRESS WRITE !
KILL DIR
SET DIR("A")="Press the return key to continue or '^' to exit: "
SET DIR(0)="FOA"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT
RANGE ; range of numbers
+1 IF $$LOCK^SROUTL(SRTN)
Begin DoDot:1
+2 SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
if SRSOUT
QUIT
DO ONE
End DoDot:1
DO UNLOCK^SROUTL(SRTN)
+3 QUIT
ONE ; edit one item
+1 KILL DR,DA,DIE
SET DR=$PIECE(SRZ(EMILY),"^",2)_"T"
SET DA=SRTN
SET DIE=130
SET SRDT=$PIECE(SRZ(EMILY),"^",3)
if SRDT
SET DR=DR_";"_SRDT_"T"
DO ^DIE
KILL DR,DA
IF $DATA(Y)
SET SRSOUT=1
+2 QUIT
TR SET J=I
SET J=$TRANSLATE(J,"1234567890.","ABCDEFGHIJP")
+1 QUIT
GET SET X=$TEXT(@J)
+1 QUIT
END WRITE @IOF
DO ^SRSKILL
+1 QUIT
FGJ ;;670^Current Residence
FGA ;;671^Ambulation Device
FGC ;;673^History of Cancer
FGD ;;674^History of Radiation Therapy
FGG ;;677^Num of Prior Surg in Same OP