source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORCXPND3.m@ 1492

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

initial load of FOIAVistA 6/30/08 version

File size: 5.8 KB
Line 
1ORCXPND3 ; SLC/MKB,dcm - Expanded display of Reports ;2/21/01 14:07
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**25,30,43,85,172**;Dec 17, 1997
3LRA ; -- Anatomic Pathology Report
4 N DFN,Y,I,LRLLOC,LRQ
5 D TIT^ORCXPNDR("Anatomic Path Report") Q:$$OS^ORCXPNDR()
6 D PREP^ORCXPNDR
7 D RPT^ORWRP(.Y,ID,3)
8 D ITEM^ORCXPND("Anatomic Path Report")
9 S I=3 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("ORDATA",$J,1,I)
10 K ^TMP("ORDATA",$J)
11 Q
12 ;
13LRAA ; -- Alternate Anatomic Path Report
14 N DFN,Y,I,LRLLOC,LRQ
15 D TIT^ORCXPNDR("Alternate Anatomic Path Report") Q:$$OS^ORCXPNDR()
16 D PREP^ORCXPNDR I $$OS^ORCXPNDR() Q
17 D AP^LR7OSUM(ID)
18 D ITEM^ORCXPND("Anatomic Pathology Report")
19 I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="No Anatomic Pathology reports available..."
20 S I=0 F S I=$O(^TMP("LRC",$J,I)) Q:I<1 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("LRC",$J,I,0)
21 K ^TMP("LRC",$J)
22 Q
23LRB1 ; -- Blood Bank Report
24 N DFN,Y,I,LRBLOOD,LRCAPA,LRDT0,LRLABKY,LRLLOC,LRO,LRPCEVSO,LRPLASMA,LRSERUM,LRT,LRUNKNOW,LRURINE,LRVIDO,LRVIDOF
25 D TIT^ORCXPNDR("Blood Bank Report") Q:$$OS^ORCXPNDR()
26 D PREP^ORCXPNDR
27 D RPT^ORWRP(.Y,ID,2)
28 D ITEM^ORCXPND("Blood Bank Report")
29 S I=5 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("ORDATA",$J,1,I)
30 K ^TMP("ORDATA",$J)
31 Q
32 ;
33LRB ; -- A better Blood Bank Report
34 N DFN,ORY,I,SUBHEAD
35 D TIT^ORCXPNDR("Blood Bank Report")
36 S DFN=ID
37 D PREP^ORCXPNDR
38 I $L($T(EN^ORWLR1)),$L($T(CPRS^VBECA3B)) D Q ;Transition to VBEC's interface
39 . K ^TMP("ORLRC",$J)
40 . D EN^ORWLR1(DFN)
41 . I '$O(^TMP("ORLRC",$J,0)) S ^TMP("ORLRC",$J,1,0)="",^TMP("ORLRC",$J,2,0)="No Blood Bank report available..."
42 . D ITEM^ORCXPND("Blood Bank Report"),BLANK^ORCXPND
43 . S I=0 F S I=$O(^TMP("ORLRC",$J,I)) Q:I'>0 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("ORLRC",$J,I,0)
44 . K ^TMP("ORLRC",$J)
45 S SUBHEAD("BLOOD BANK")=""
46 D EN^LR7OSUM(.ORY,DFN,,,,,.SUBHEAD)
47 I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="No Blood Bank report available..."
48 D ITEM^ORCXPND("Blood Bank Report"),BLANK^ORCXPND
49 S I=0 F S I=$O(^TMP("LRC",$J,I)) Q:I'>0 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("LRC",$J,I,0)
50 K ^TMP("LRC",$J),^TMP("LRH",$J)
51 Q
52LRC ; -- Lab Cumulative
53 N DFN,ORY,I,BEG,END,OREND,ORSSTRT,ORSSTOP
54 D TIT^ORCXPNDR("Lab Cumulative")
55 S DFN=ID
56 D RANGE($S($G(ORWARD):7,1:180)) Q:OREND S BEG=+ORSSTRT,END=+ORSSTOP
57 D PREP^ORCXPNDR
58 D EN^LR7OSUM(.ORY,DFN,BEG,END)
59 D ITEM^ORCXPND("Lab Cumulative"),BLANK^ORCXPND
60 S I=0 F S I=$O(^TMP("LRC",$J,I)) Q:I'>0 S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=^TMP("LRC",$J,I,0)
61 K ^TMP("LRC",$J),^TMP("LRH",$J)
62 Q
63 ;
64LRG ; -- Graph Lab Tests
65 N DFN,Y,I,X,BCNT,LRSS,LRCW,LRFLAG,LRCTRL,LRNSET,N,LOW,LRPCEVSO,LRPRAC,LRRB,LRTREA,LRVIDO,LRVIDOF,OREND,ORSSTRT,ORSSTOP
66 D TIT^ORCXPNDR("Graph Lab Tests") Q:$$OS^ORCXPNDR()
67 D RANGE($S($G(ORWARD):7,1:180)) Q:OREND
68 S LRSS="CH",LRCW=8,LRFLAG="",LRCTRL=0,(LRNSET,N)=80
69 D L2^LRDIST4 Q:'$D(LRTEST)
70 D PREP^ORCXPNDR
71 D RPT^ORWRP(.Y,ID,8,,,,+ORSSTRT,+ORSSTOP)
72 D ITEM^ORCXPND("Lab Graph")
73 S I=4,BCNT=0
74 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S X=^(I) D
75 . I '$L(X) S BCNT=BCNT+1 I BCNT>1 Q
76 . S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X S:$L(X) BCNT=0
77 K ^TMP("ORDATA",$J)
78 Q
79 ;
80LRI ; -- Interim Lab Results
81 N ORX,DFN,Y,I,X,BCNT,LREDT,LRIDT,LRLLT,LRPCEVSO,LRPRAC,LRRB,LRTREA,LRVIDO,LRVIDOF,OREND,ORSSTRT,ORSSTOP
82 D TIT^ORCXPNDR("Lab Interim Results") Q:$$OS^ORCXPNDR()
83 D RANGE($S($G(ORWARD):7,1:180)) Q:OREND
84 D SET^LRRP4
85 D PREP^ORCXPNDR
86 D RPT^ORWRP(.Y,ID,3,,,,+ORSSTRT,+ORSSTOP)
87 D ITEM^ORCXPND("Lab Interim Report")
88 S I=0,BCNT=0
89 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S X=^(I) D
90 . I '$L(X) S BCNT=BCNT+1 I BCNT>1 Q
91 . S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X S:$L(X) BCNT=0
92 K ^TMP("ORDATA",$J)
93 Q
94LRGEN ;Lab Results by Test
95 N DFN,Y,I,II,X,BCNT,LRPRETTY,LREDT,LRLLT,LRPCEVSO,LRPRAC,LRRB,LRTREA,LRVIDO,LRVIDOF,LRCW,LREND,LRTP,LRIX,LRWPL,LRIDT,LRSC,DIC,LRTSTS,LRORD,LRTEST,LRSUB,LRHDR,LRSSP,LRHI,LRLO
96 N LBL,LRBLOOD,LRDAT,LRDFN,LRDPF,LRDT0,LREX,LRFFLG,LRFOOT,LRLAB,LRLABKY,LRND,LRNG,LRNOP,LRNOTE,LRODT0,LRONESPC,LRONETST,LRPAGE,LRPARAM,LRPLASMA,LRPP,LRSERUM,LRPS,LRTN,LRUNKNOW,LRURINE,LRWRD,LRX,LRY
97 N AGE,I,INC,LRIDT1,LRSV,OREND,ORSSTRT,ORSSTOP
98 K ^TMP("LR",$J)
99 D TIT^ORCXPNDR("Lab Results by Test") Q:$$OS^ORCXPNDR()
100 D RANGE($S($G(ORWARD):7,1:180)) Q:OREND
101 D SET^LRGEN
102 Q:LREND!'LRTSTS
103 D PREP^ORCXPNDR
104 D RPT^ORWRP(.Y,ID,16,,,,+ORSSTRT,+ORSSTOP)
105 D ITEM^ORCXPND("Lab Results by Test")
106 S I=1,BCNT=0
107 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S X=^(I) D
108 . I '$L(X) S BCNT=BCNT+1 I BCNT>1 Q
109 . S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X S:$L(X) BCNT=0
110 K ^TMP("ORDATA",$J)
111 Q
112 ;
113STAT ; -- Lab test status
114 N DFN,Y,I,X,BCNT,OREND,ORSSTRT,ORSSTOP
115 D TIT^ORCXPNDR("Lab Test Status") Q:$$OS^ORCXPNDR()
116 D RANGE($S($G(ORWARD):7,1:180)) Q:$G(OREND)
117 D PREP^ORCXPNDR
118 D RPT^ORWRP(.Y,ID,9,,,,+ORSSTRT,+ORSSTOP)
119 D ITEM^ORCXPND("Lab Test Status")
120 S I=0,BCNT=0
121 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S X=$S($D(^(I))#2:^(I),$D(^(I,0))#2:^(0),1:"") D
122 . I '$L(X) S BCNT=BCNT+1 I BCNT>1 Q
123 . S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X S:$L(X) BCNT=0
124 K ^TMP("ORDATA",$J)
125 Q
126RANGE(BEG) ;Get date range for report
127 ;BEG=# of days (T-BEG) for start default
128 ;Output: ORSSTRT=Start date/time
129 ; ORSSTOP=Stop date/time
130 ; OREND=1 if user '^'s out, so look for it!
131 S BEG=$$FMADD^XLFDT(DT,-$G(BEG)),END=$$NOW^XLFDT
132 D RANGE^ORPRS01(BEG,END)
133 Q
134MED(MED) ; -- Medicine Summary of Patient Procedures
135 N DFN,Y,I,X,BCNT,OREND,PROCID
136 D TIT^ORCXPNDR("Summary of Patient Procedures") Q:$$OS^ORCXPNDR()
137 D PREP^ORCXPNDR
138 S DFN=+ID,PROCID=$P(MED,"~",2)
139 D RPT^ORWRP(.Y,DFN,19,,,PROCID)
140 D ITEM^ORCXPND("Summary of Patient Procedures")
141 S I=4,BCNT=0
142 F S I=$O(^TMP("ORDATA",$J,1,I)) Q:I<1 S X=^(I) D
143 . I '$L(X) S BCNT=BCNT+1 I BCNT>1 Q
144 . I $E(X,1,4)="Pg. " Q
145 . I X["PHYSICIANS' SIGNATURE" Q
146 . S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X S:$L(X) BCNT=0
147 K ^TMP("ORDATA",$J)
148 Q
Note: See TracBrowser for help on using the repository browser.