source: FOIAVistA/trunk/r/SURGERY-SR/SRCUSS1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1SRCUSS1 ;TAMPA/CFB - SCREEN SERVER ; [ 03/11/02 13:40 PM ]
2 ;;3.0; Surgery ;**14,31,48,66,108**;24 Jun 93
3B G BQ:Q(13)=2 Q:$D(Q("X")) S DR="" W:'Q("ED") !! I Q(1)="Q" S Q(1)="" Q
4 I '$D(Q(12,12)),Q(1,Q)=3,Q(7)["(MULTIPLE)" S Q7=1 G BP2
5 I Q=1,$D(Q3("DIVE")) S Q7=$P(Q3("DIVE"),"P",2) K Q3("DIVE") G BP10
6BP1 S DX=1,DY=22 X:Q("ED") Q("XY") I $D(Q3("VIEW")) S Q3("VIEW")=""
7 K QPQPQ W "Enter Screen Server Function: " R Q7:DTIME S:'$T Q7="^^" I Q7?.N S:$L(Q7)>2 Q7="?" S:Q7>15 Q7="?"
8 S:Q7="a" Q7="A" S:$E(Q7)="p" Q7="P"_$E(Q7,2,99)
9 S:$L(Q7)&("^-+123456789AP"'[$E(Q7)) Q7="?" S:$P(Q7,":",2)>15 Q7="?" S:Q7?.E1C.E Q7="?"
10 I Q7[";" F Q8=2:1 S QQ=$P(Q7,";",Q8) S:"123456789"'[$E(QQ) Q7="?" Q:'QQ
11 I Q7["?" D QUES G BP2
12 K SRCUSS("OUT")
13 I Q7'?.N1";".E,(Q7'?.N),(Q7'?.N1":".E),(Q7'="A"),("^^"'[Q7),(Q7'?1"+".N),(Q7'?1"-".N),(Q7'?1"P"1N.N) D QUES G BP2
14 W Q("LO")
15BP10 I Q7="A" S Q7="1:"_(Q(1,Q)-1)
16 S:$S(Q7="^^":1,$E(Q7)'="L":0,+$E(Q7,2,99)<Q:1,1:0) Q(12,4)=$E(Q7,2,99) S Q(13)=1 G BQ:((Q7=""&('$D(Q0(Q,Q0(0,Q)+1))))!(Q7[U))
17 I $E(Q7)="P",$L(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Q-Q8,1:1),DA(Q8)=Q(9,QQQ)
40 Q
41QUES ;
42 W:'$D(Q3("VIEW")) !,"To change entries, enter your choices (numbers) separated by a ';', or use",!,"a ':' for ranges. i.e. 2;3 or 1:3. Enter 'A' to enter/edit all.",!
43 W !,"If there is more than one page to this screen, entering '+' or '-' followed",!,"by the number of pages or entering 'P' followed by the page number will",!,"take you to the desired page."
44 W !!,"Enter '^' to quit, or '^^' to return to the menu options."
45 R !!,"Press <RET> to continue ",Q("QUESTION"):DTIME I Q("QUESTION")["?" W !!,"Forget it." H 2
46 S Q7="?" Q
47RET ; pause for display
48 I ($D(DR(1,130))&($E(DR,$L(DR)-6,$L(DR)-4)="27T"))!($D(DR(1,130.16))&($E(DR,$L(DR)-5,$L(DR)-4)="3T")) W Q("NOR"),!!,"Press <RET> to continue " R Q8:DTIME
49 Q
Note: See TracBrowser for help on using the repository browser.