Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SRCUSS1

SRCUSS1.m

Go to the documentation of this file.
SRCUSS1 ;TAMPA/CFB - SCREEN SERVER ; [ 03/11/02  13:40 PM ]
 ;;3.0;Surgery;**14,31,48,66,108,177**;24 Jun 93;Build 89
B G BQ:Q(13)=2 Q:$D(Q("X"))  S DR="" W:'Q("ED") !! I Q(1)="Q" S Q(1)="" Q
 I '$D(Q(12,12)),Q(1,Q)=3,Q(7)["(MULTIPLE)" S Q7=1 G BP2
 I Q=1,$D(Q3("DIVE")) S Q7=$P(Q3("DIVE"),"P",2) K Q3("DIVE") G BP10
BP1 S DX=1,DY=22 X:Q("ED") Q("XY") I $D(Q3("VIEW")) S Q3("VIEW")=""
 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="?"
 S:Q7="a" Q7="A" S:$E(Q7)="p" Q7="P"_$E(Q7,2,99)
 S:$L(Q7)&("^-+123456789AP"'[$E(Q7)) Q7="?" S:$P(Q7,":",2)>15 Q7="?" S:Q7?.E1C.E Q7="?"
 I Q7[";" F Q8=2:1 S QQ=$P(Q7,";",Q8) S:"123456789"'[$E(QQ) Q7="?" Q:'QQ
 I Q7["?" D QUES G BP2
 K SRCUSS("OUT")
 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
 W Q("LO")
BP10 I Q7="A" S Q7="1:"_(Q(1,Q)-1)
 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))
 I $E(Q7)="P",$L(Q7)>1,('+$E(Q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A(Q8)=Q(9,QQQ)
 Q
QUES ;
 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.",!
 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."
 W !!,"Enter '^' to quit, or '^^' to return to the menu options."
 R !!,"Press <RET> to continue  ",Q("QUESTION"):DTIME I Q("QUESTION")["?" W !!,"Forget it." H 2
 S Q7="?" Q
RET ; pause for display
 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
 Q
ICD I $G(DIE)["^SRF(" D
 . N SRALAN,SRALAN1,SRALAN2
 .I DIE'="^SRF(",$G(DR) I $P($G(^DD(+Q("0","2"),+DR,0)),U,2)["P80" S DR=+DR_$G(^DD(+Q("0","2"),+DR,.1))_" "_$G(SRICDV)_";Q;"
 . I DIE="^SRF(",$G(DR) F SRALAN=1:2 S SRALAN1=$P(DR,";",SRALAN,SRALAN+1) Q:SRALAN1=""  D
 .. I $P($G(^DD(130,+SRALAN1,0)),U,2)["P80" D
 ... S (SRALAN2,SRALAN2(1,130))=+SRALAN1_$G(^DD(130,+SRALAN1,.1))_" "_$G(SRICDV)_";Q"
 ... S $P(DR,";",SRALAN,SRALAN+1)=SRALAN2
 ... S $P(DR(1,130),";",SRALAN,SRALAN+1)=SRALAN2
 Q