source: FOIAVistA/trunk/r/SURGERY-SR/SRCUSS4.m@ 847

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1SRCUSS4 ;TAMPA/CFB - SCREEN SERVER ; 24 Jan 1989 7:40 AM
2 ;;3.0; Surgery ;;24 Jun 93
3PAGE S (Q("P",Q),Q8,Q6,Q("C"))=1 K Q0(Q) I Q=1,Q7="DR" S Q7="DR("_Q_","_+Q(0,Q) I '$D(@(Q7_")"))#2 S Q7="DR"
4 I $E(Q7,$L(Q7))=")" S Q7=$E(Q7,1,$L(Q7)-1)
5 S Q(12,6)=$S($D(@(Q7_$S(Q7["(":")",1:""))):@(Q7_$S(Q7["(":")",1:"")),1:".01;") S:Q(12,6)=".01" Q(12,6)=".01;" S Q0(Q,0)=$S(Q7["Q1":$P(Q(12,6),";",3,999),1:Q(12,6)) D PA1
6 F Q0(0)=0:0 S @("Q0(0)=$O("_Q7_$S(Q7["("&($E(Q7,$L(Q7))'="("):",",1:"(")_Q0(0)_"))") Q:Q0(0)<1 S Q(12,6)=@(Q7_$S(Q7["("&($E(Q7,$L(Q7))'="("):",",1:"(")_Q0(0)_")"),Q0(Q,0)=Q0(Q,0)_$S(Q7["Q1":$P(Q(12,6),";",3,999),1:Q(12,6)) D PA1
7 I $D(Q(14)),Q("TEM"),'$D(^TMP("SRCUSS",$J,Q(14),Q,+Q(0,Q))) S Q0(-1)=1000 F Q0(0)=0:0 S Q0(0)=$O(Q0(Q,Q0(0))) Q:Q0(0)<1 S ^TMP("SRCUSS",$J,Q(14),Q,+Q(0,Q),Q0(0))=$P(Q0(Q,Q0(0)),";",2,999) D PAGE0
8 Q
9PAGE0 F Q0(-2)=0:0 S Q0(-2)=$O(Q0(Q,Q0(0),Q0(-2))) Q:Q0(-2)<1 S ^TMP("SRCUSS",$J,Q(14),Q,+Q(0,Q),Q0(-1))="Q0("_Q_","_Q0(0)_","_Q0(-2)_")",^(Q0(-1)+1000)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8),Q("P",Q)=Q8 S:Q8>999 @^(Q8)=^(Q8+1000)
21 I $T S Q(13)=1,Q7=Q(12,5) Q
22 D PAGE S Q(13)=1,Q7=Q(12,5) Q
Note: See TracBrowser for help on using the repository browser.