source: FOIAVistA/trunk/r/SURGERY-SR/SROAOP2.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1SROAOP2 ;BIR/ADM - OPERATION INFO, PAGE 2 ; [ 04/13/04 12:35 PM ]
2 ;;3.0; Surgery ;**81,88,100,125**;24 Jun 93
3 ; called from SROAOP
4EDIT Q:SRSOUT S SRHDR(.5)=SRDOC,SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL
5 K DR S SRQ=0,(DR,SRDR)=".205;.22;.23;.232;.21;.24;1.18"
6 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
7 K SRX S SRX=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
8 .D TR,GET
9 .S SRX=SRX+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRX(SRX))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
10 .W !,SRX_". "_$P(Z,"^")_":" D EXT
11 W !! F K=1:1:80 W "-"
12 D SEL G EDIT
13 Q
14EXT I SREXT["@" S X=$P(SREXT,"@")_" "_$P(SREXT,"@",2),SREXT=X
15 W ?39,SREXT
16 Q
17SEL W !!,"Select Operative Information to Edit: " R X:DTIME I '$T!(X["^")!(X="") S SRSOUT=1 Q
18 S:X="a" X="A" I '$D(SRFLG),'$D(SRX(X)),(X'?1.2N1":"1.2N),X'="A" D HELP Q
19 I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRX)!(Y>Z) D HELP Q
20 I X="A" S X="1:"_SRX
21 I X?1.2N1":"1.2N D RANGE Q
22 I $D(SRX(X)),+X=X S EMILY=X D
23 .I $$LOCK^SROUTL(SRTN) D ONE,UNLOCK^SROUTL(SRTN)
24 Q
25HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
26 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),"^")_")"
27 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.)",!
28 I $D(SRFLG) W !,"4. Enter 'N' or 'NO' to enter negative response for all items.",!!,"5. Enter '@' to delete information from all items.",!
29PRESS 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
30 Q
31RANGE ; range of numbers
32 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
33 .S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
34 Q
35ONE ; edit one item
36 N SRW
37 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
38 S SRW=Y K DR,DA,DIE S DR=$P(SRX(EMILY),"^",2)_"////"_SRW,DA=SRTN,DIE=130 D ^DIE K DR,DA
39 Q
40TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
41 Q
42GET S X=$T(@J)
43 Q
44PBJE ;;.205^Patient in Room (PIR)
45PBB ;;.22^Procedure/Surgery Start Time (PST)
46PBC ;;.23^Procedure/Surgery Finish (PF)
47PBCB ;;.232^Patient Out of Room (POR)
48PBA ;;.21^Anesthesia Start (AS)
49PBD ;;.24^Anesthesia Finish (AF)
50APAH ;;1.18^Discharge from PACU (DPACU)
Note: See TracBrowser for help on using the repository browser.