source: FOIAVistA/trunk/r/GEN_MED_REC_GENERATOR-GMRG/GMRGPUT0.m@ 1427

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1GMRGPUT0 ;CISC/JH-TEXT GENERATOR DATA SORT FOR OUTPUT (cont.) ;2/28/89
2 ;;3.0;Text Generator;;Jan 24, 1996
3PRT1 ;
4 S GMRGC=$O(GMRGUCCH(GMRGG,0)),GMRGPCL=GMRGPCL+1
5 I '(GMRGPCL#(IOSL-3)) R !,"^ TO STOP: ",X:DTIME S:X="^"!(X="^^")!'$T GMRGOUT=$S(X="^":1,1:2) Q:GMRGOUT
6 W !,$J(GMRGG,3)," ",$S(GMRGC'>0:"",$D(^GMRD(124.25,GMRGC,0)):$P(^(0),"^"),1:"")
7 Q
8 ;
9CHECLAS I GMRGB'?1N.N&(GMRGB'?1N.N1"-"1N.N) S GMRGBAD=1 Q
10 S GMRGBEG=+GMRGB,GMRGEND=$S(GMRGB'["-":+GMRGB,1:+$P(GMRGB,"-",2)) I (GMRGBEG<1)!(GMRGBEG>GMRGUCCH)!(GMRGEND<1)!(GMRGEND>GMRGUCCH)!(GMRGEND<GMRGBEG) S GMRGBAD=1 Q
11 F GMRGA=GMRGBEG:1:GMRGEND S ^TMP($J,"GMRGCPCH",GMRGA)=$O(GMRGUCCH(GMRGA,0))
12 Q
13PRT2 ;
14 S GMRGC=$O(GMRGPCHC(GMRGA,0)),GMRGPCL=GMRGPCL+1
15 I '(GMRGPCL#(IOSL-3)) R !,"^ TO STOP: ",X:DTIME S:X="^"!(X="^^")!'$T GMRGOUT=$S(X="^":1,1:2) Q:GMRGOUT
16 S GMRGXPRT=$S(GMRGC'>0:"",$D(^GMRD(124.2,GMRGC,0)):$P(^(0),"^"),1:""),GMRGXPRT(0)=$S(GMRGC'>0:"",1:$O(^GMR(124.3,GMRGPDA,1,"B",GMRGC,0))),GMRGXPRT(0)=$S(GMRGXPRT(0)'>0:"",$D(^GMR(124.3,GMRGPDA,1,GMRGXPRT(0),0)):$P(^(0),"^",2),1:"")
17 S GMRGXPRT(1)="6^"_IOM_"^1^0" W !,$J(GMRGA,3),". " D EN1^GMRGRUT2
18 Q
19 ;
20CHKREQ I GMRGB'?1N.N&(GMRGB'?1N.N1"-"1N.N) S GMRGBAD=1 Q
21 S GMRGBEG=+GMRGB,GMRGEND=$S(GMRGB'["-":+GMRGB,1:+$P(GMRGB,"-",2)) I (GMRGBEG<1)!(GMRGBEG>GMRGG)!(GMRGEND<1)!(GMRGEND>GMRGG)!(GMRGEND<GMRGBEG) S GMRGBAD=1 Q
22 F GMRGA=GMRGBEG:1:GMRGEND S ^TMP($J,"GMRGUPCH",GMRGA)=$O(GMRGPCHC(GMRGA,0))
23 Q
Note: See TracBrowser for help on using the repository browser.