source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORPRS05.m@ 1015

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1ORPRS05 ; slc/dcm - Order summary headers, footers, inerds ;6/10/97 15:42
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11**;Dec 17, 1997
3PTOP(PG,TITLE,SHORT,START,STOP) ;header for printouts
4 ;PG=Page #
5 ;TITLE=Report title
6 ;SHORT=Format type (short or long)
7 ;START=Internal start date^External start date
8 ;STOP=Internal stop date^External Stop date
9 Q:'$G(PG) Q:'$D(TITLE)
10 N ORHLINE S $P(ORHLINE,"=",IOM+1)=""
11 W !?(IOM-$L(ORTIT)\2),ORTIT,?(IOM-($L(PG)+5)),$S('$G(SHORT):"Page "_PG,1:"")
12 W ! I $L($P(START,"^",2)) D W X
13 . S X=$P(START,"^",2)_" thru "_$P(STOP,"^",2) I $$FMDIFF^XLFDT(+STOP,+START)<2 S X="For: "_$P($P(STOP,"^",2),"@")
14 S X=$P($$HTE^XLFDT($H),":",1,2) W ?IOM-($L(X)+8),"Printed "_X
15 W !,"Ord'd",?9,"ST",?13,"Item Ordered",?54,"Requestor Start Stop",!,ORHLINE
16 Q
17PBOT(PG,BOTTOM,NAME,SSN,DOB,AGE,WEIGHT,LOC,BED,SHORT) ;Footer for printouts
18 ;PG=Page #
19 ;BOTTOM=Page length
20 ;NAME=Patient name
21 ;SSN=SSN, DOB=DOB, AGE=Age, WEIGHT=Weight, LOC=Location, BED=bed
22 ;SHORT=Report format (short or long)
23 Q:'$G(PG) Q:'$G(BOTTOM) Q:'$D(NAME) Q:'$D(SSN) Q:'$D(DOB) Q:'$D(AGE) Q:'$D(LOC)
24 N ORHLINE S $P(ORHLINE,"=",IOM+1)=""
25 I '$G(SHORT) F I=$Y:1:(BOTTOM-6) W !
26 W !,ORHLINE S X=DOB_" ("_AGE_") "_"Wt (lb): "_$S($D(WEIGHT):WEIGHT,1:" ")
27 W !,NAME," ",SSN,?IOM-$L(X),X
28 W !,LOC,$S($L($G(BED)):"/"_BED,1:"") W:'$G(SHORT) ?(IOM-($L(PG)+5)),"Page "_PG,!
29 Q
30CTOP(PG,SEND,EOP,TITLE,SHORT,LOC,BED,WARD,NAME,SSN,DOB,AGE,WEIGHT) ;Display header
31 ;PG=Page #
32 ;SEND=??
33 ;EOP=??
34 ;TITLE=Report title
35 ;SHORT=Report format (short or long)
36 Q:'$G(PG) Q:'$D(TITLE) Q:'$D(SHORT)
37 I $G(SEND),$G(EOP) Q
38 N ORHLINE S $P(ORHLINE,"=",IOM+1)=""
39 W @IOF
40 W !?(IOM-$L(TITLE)\2),TITLE I $G(PG) W ?IOM-$L(PG)-5,"Page "_PG
41 I '$G(SHORT) D HDG
42 W !,"Ord'd",?9,"St",?13,"Item Ordered",?54,"Requestor Start Stop",!,ORHLINE
43 Q
44HDG ;Print header
45 Q:'$D(DOB) Q:'$D(AGE) Q:'$D(WEIGHT) Q:'$D(NAME) Q:'$D(SSN)
46 I '$D(LOC),$G(WARD) S X=+$G(^DIC(42,+WARD,44)) S LOC=$P($G(^SC(X,0)),"^",2)
47 S X=DOB_" ("_AGE_") "_"Wt (lb): "_$S($D(WEIGHT):WEIGHT,1:" ")
48 S:'$D(BED) BED=""
49 S X1=LOC_$S($L(BED):"/"_BED,1:"")
50 W !,NAME," ",SSN,?39-($L(X1)\2),X1,?(79-$L(X)),X
51 Q
Note: See TracBrowser for help on using the repository browser.