source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORUHDR.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1ORUHDR ; slc/dcm - Order entry display headers ;3/25/92 15:05 ;
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3OE ;Main Order Entry Header, expects ORUIEN (variable pointer)
4 ;From: OR USER MENU
5 K ORDG S ORTIT="ORDER ENTRY",ORSTIT=""
6 S ORSTIT=$P(@("^"_$P(ORUIEN,";",2)_+ORUIEN_",0)"),"^",2),ORSTIT=$P(ORSTIT,"...")
7 D TIT,STIT3 W:'$G(ORANSI) ! D:$G(ORANSI) STIT2
8 K ORDG,ORPD,ORTIT,ORSTIT Q
9OE2 ;Accept Orders Screen Header From: ORREV31
10 K ORDG S ORTIT="ORDER ENTRY"
11 D TIT I $D(ORSTIT),$L(ORSTIT) D STIT3 D:$G(ORANSI) STIT2
12 Q
13EXT ;Detailed Display Header From: ORSED
14 Q:'$D(^OR(100,+$G(ORIFN),0))
15 N ORL,OROLD
16 S:'$D(ORTIT) ORTIT="DETAILED DISPLAY" S X=^OR(100,ORIFN,0),ORDG=$P(X,"^",11),ORDG=$P(^ORD(100.98,ORDG,0),"^",3),ORVP=$P(X,"^",2),Y=+ORVP D END^ORUDPA Q:'$D(ORPNM)
17 S:'$D(ORANSI) ORANSI=0 S:'$D(ORFT) ORFT=0 S:'$D(ORIO) ORIO="HOME"
18 I '$D(IOF) S IOP=ORIO D ^%ZIS Q:POP S X=0 X ^%ZOSF("RM") S (ORFT,ORANSI)=0
19 D TIT K ORDG,ORTIT Q
20TIT ;General Header From: OROPRO
21 N ORCWAD S ORCWAD=""
22 I '$D(ORDG),$D(^OR(100,+$G(ORIFN),0)) D
23 . S ORDG=$P($G(^ORD(100.98,+$P($G(^OR(100,+$G(ORIFN),0)),U,11),0)),U,3)
24 I $L($T(CWAD^GMRPNOR1)),$D(ORVP) S ORCWAD=$$CWAD^GMRPNOR1(+ORVP) K GMRPCWAD
25 I $G(ORANSI) D:ORFT=0 ANSIH^ORPRS09 Q:ORFT=0 S ORFT=0 D ANSIR
26 ;W !! F I=1:1:79 W "-"
27 S:'$D(XQORSPEW) XQORSPEW=0 W @IOF I $L($G(ORDG)),(ORTIT'[$G(ORDG)) S ORTIT=$G(ORDG)_" "_ORTIT
28 S X="" F I=1:1:$L(ORTIT) S X=X_" "_$E(ORTIT,I)
29 W $C(13),$$HON^ORU,$S($L(ORCWAD):"<"_ORCWAD_">",1:""),$$HOFF^ORU,?(80-($L(ORTIT)*2))/2,X,?(IOM-12),$$HON^ORU,$S(XQORSPEW:"Quick mode",1:""),$$HOFF^ORU
30 I $D(ORPNM),$D(ORSSN),$D(ORL),$D(ORDOB) D HDG
31 W ! F I=1:1:79 W "-"
32 I $G(ORANSI) K ORANSI("ST") S ORANSI("T")=$Y+2,ORANSI("B")=24,ORANSI("SL")=ORANSI("B")-ORANSI("T") D ANSIS,ANSIT
33 Q
34STIT ;Print Sub-header
35 S ORSTIT=$P(@("^"_$P(ORUIEN,";",2)_+ORUIEN_",0)"),"^",2) W !
36STIT1 W $C(13),?(40-($L(ORSTIT)\2)-4),"--- "_ORSTIT_" ---"
37 K ORSTIT Q
38STIT2 I '$D(ORANSI("ST")) S ORANSI("T")=ORANSI("T")+1,ORANSI("SL")=ORANSI("SL")-1
39 D ANSIS,ANSIT
40 Q
41STIT3 I $G(ORANSI),'$D(ORANSI("ST")) S ORANSI("ST")=ORANSI("T"),ORANSI("T")=ORANSI("T")+1,ORANSI("SL")=ORANSI("SL")-1
42 I $G(ORANSI) S DX=1,DY=ORANSI("ST") W @ORANSI("XY"),@ORANSI("EOLN")
43 W:'$G(ORANSI) ! D STIT1
44 Q
45HDG ;PRINT HEADING
46 ;I $D(VAIN("5")) S Y=+ORVP D END^ORUDPA
47 S X=" "_ORDOB_" ("_ORAGE_") "_"Wt (lb): "_$S($D(ORPD):ORPD,1:" ")
48 S X1=$S($G(ORL):$S($L($P(^SC(+ORL,0),"^",2)):$P(^(0),"^",2),1:$E($P(^(0),"^"),1,4)),1:"")_$S($L($G(ORL(1))):"/"_ORL(1),1:"")
49 W !,ORPNM_" "_ORSSN_" ",?(39-($L(X1)\2))," "_X1_" ",?(79-$L(X)),X
50 Q
51PGBRK ;Call for page break
52 N I,X I $D(IOST),$E(IOST)["C" F I=$Y:1:IOSL-4 W !
53PGBRK1 S OREND=0,X="" I $S($D(IOST):$E(IOST)["C",1:1) R !!,"Press return to continue or ""^"" to escape ",X:$S($D(DTIME):DTIME,1:300)
54 I X["^" S:X="^^" DIROUT=1 S OREND=1
55 Q
56ANSIR ;Reset scroll region to full screen
57 W $C(27),$C(91),"1",$C(59),"24",$C(114),$C(13),#,$C(27),$C(91),$C(50),$C(74),$C(27),$C(91),$C(72)
58 Q
59ANSIS ;Set scroll region
60 W $C(27),$C(91),ORANSI("T"),$C(59),ORANSI("B"),$C(114),$C(13)
61 S (DX,DY)=0 X ^%ZOSF("XY")
62 Q
63ANSIT ;Move cursor to top of scroll region
64 S DX=1,DY=ORANSI("T") W @ORANSI("XY"),$C(13)
65 Q
Note: See TracBrowser for help on using the repository browser.