SROAOP2 ;BIR/ADM - OPERATION INFO, PAGE 2 ; [ 04/13/04 12:35 PM ]
;;3.0; Surgery ;**81,88,100,125**;24 Jun 93
; called from SROAOP
EDIT Q:SRSOUT S SRHDR(.5)=SRDOC,SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL
K DR S SRQ=0,(DR,SRDR)=".205;.22;.23;.232;.21;.24;1.18"
K DA,DIC,DIQ,SRY S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="E",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
K SRX S SRX=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
.D TR,GET
.S SRX=SRX+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRX(SRX))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
.W !,SRX_". "_$P(Z,"^")_":" D EXT
W !! F K=1:1:80 W "-"
D SEL G EDIT
Q
EXT I SREXT["@" S X=$P(SREXT,"@")_" "_$P(SREXT,"@",2),SREXT=X
W ?39,SREXT
Q
SEL W !!,"Select Operative Information to Edit: " R X:DTIME I '$T!(X["^")!(X="") S SRSOUT=1 Q
S:X="a" X="A" I '$D(SRFLG),'$D(SRX(X)),(X'?1.2N1":"1.2N),X'="A" D HELP Q
I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRX)!(Y>Z) D HELP Q
I X="A" S X="1:"_SRX
I X?1.2N1":"1.2N D RANGE Q
I $D(SRX(X)),+X=X S EMILY=X D
.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-"_SRX_") to update an individual item. (For example,",!," enter '1' to update "_$P(SRX(1),"^")_")"
W !!,"3. Enter a range of numbers (1-"_SRX_") 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
N SRW
W ! K DA,DIR S DA=SRTN,DIR(0)="130,"_$P(SRX(EMILY),"^",2),DIR("A")=$P(SRX(EMILY),"^") D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
S SRW=Y K DR,DA,DIE S DR=$P(SRX(EMILY),"^",2)_"////"_SRW,DA=SRTN,DIE=130 D ^DIE K DR,DA
Q
TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
Q
GET S X=$T(@J)
Q
PBJE ;;.205^Patient in Room (PIR)
PBB ;;.22^Procedure/Surgery Start Time (PST)
PBC ;;.23^Procedure/Surgery Finish (PF)
PBCB ;;.232^Patient Out of Room (POR)
PBA ;;.21^Anesthesia Start (AS)
PBD ;;.24^Anesthesia Finish (AF)
APAH ;;1.18^Discharge from PACU (DPACU)
SROAOP2 ;BIR/ADM - OPERATION INFO, PAGE 2 ; [ 04/13/04 12:35 PM ]
+1 ;;3.0; Surgery ;**81,88,100,125**;24 Jun 93
+2 ; called from SROAOP
EDIT IF SRSOUT
QUIT
SET SRHDR(.5)=SRDOC
SET SRPAGE="PAGE: 2 OF 2"
DO HDR^SROAUTL
+1 KILL DR
SET SRQ=0
SET (DR,SRDR)=".205;.22;.23;.232;.21;.24;1.18"
+2 KILL DA,DIC,DIQ,SRY
SET DIC="^SRF("
SET DA=SRTN
SET DIQ="SRY"
SET DIQ(0)="E"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+3 KILL SRX
SET SRX=0
FOR M=1:1
SET I=$PIECE(SRDR,";",M)
IF 'I
QUIT
Begin DoDot:1
+4 DO TR
DO GET
+5 SET SRX=SRX+1
SET Y=$PIECE(X,";;",2)
SET SRFLD=$PIECE(Y,"^")
SET (Z,SRX(SRX))=$PIECE(Y,"^",2)_"^"_SRFLD
SET SREXT=SRY(130,SRTN,SRFLD,"E")
+6 WRITE !,SRX_". "_$PIECE(Z,"^")_":"
DO EXT
End DoDot:1
+7 WRITE !!
FOR K=1:1:80
WRITE "-"
+8 DO SEL
GOTO EDIT
+9 QUIT
EXT IF SREXT["@"
SET X=$PIECE(SREXT,"@")_" "_$PIECE(SREXT,"@",2)
SET SREXT=X
+1 WRITE ?39,SREXT
+2 QUIT
SEL WRITE !!,"Select Operative Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")!(X="")
SET SRSOUT=1
QUIT
+1 IF X="a"
SET X="A"
IF '$DATA(SRFLG)
IF '$DATA(SRX(X))
IF (X'?1.2N1":"1.2N)
IF X'="A"
DO HELP
QUIT
+2 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRX)!(Y>Z)
DO HELP
QUIT
+3 IF X="A"
SET X="1:"_SRX
+4 IF X?1.2N1":"1.2N
DO RANGE
QUIT
+5 IF $DATA(SRX(X))
IF +X=X
SET EMILY=X
Begin DoDot:1
+6 IF $$LOCK^SROUTL(SRTN)
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot: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-"_SRX_") to update an individual item. (For example,",!," enter '1' to update "_$PIECE(SRX(1),"^")_")"
+2 WRITE !!,"3. Enter a range of numbers (1-"_SRX_") 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 NEW SRW
+2 WRITE !
KILL DA,DIR
SET DA=SRTN
SET DIR(0)="130,"_$PIECE(SRX(EMILY),"^",2)
SET DIR("A")=$PIECE(SRX(EMILY),"^")
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
QUIT
+3 SET SRW=Y
KILL DR,DA,DIE
SET DR=$PIECE(SRX(EMILY),"^",2)_"////"_SRW
SET DA=SRTN
SET DIE=130
DO ^DIE
KILL DR,DA
+4 QUIT
TR SET J=I
SET J=$TRANSLATE(J,"1234567890.","ABCDEFGHIJP")
+1 QUIT
GET SET X=$TEXT(@J)
+1 QUIT
PBJE ;;.205^Patient in Room (PIR)
PBB ;;.22^Procedure/Surgery Start Time (PST)
PBC ;;.23^Procedure/Surgery Finish (PF)
PBCB ;;.232^Patient Out of Room (POR)
PBA ;;.21^Anesthesia Start (AS)
PBD ;;.24^Anesthesia Finish (AF)
APAH ;;1.18^Discharge from PACU (DPACU)