source: FOIAVistA/trunk/r/PHARMACY_PRESCRIPTION_PRACTICE-PPP/PPPPRT23.m@ 1765

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1PPPPRT23 ;ALB/JFP - FFX PRINT ROUTINES ; 3/16/92
2 ;;V1.0;PHARMACY PRESCRIPTION PRACTICE;;APR 7,1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5VISHISTP ;
6 ;
7 N PPPMRT,PRTFFXST,PRTFFXND
8 N STANUM,VISITS,STARS,PPPARRY,TMP,I,DR,DIR,TPATS,TVIS,TSTA,PATFILE
9 N NUMVIS,ENDING,NUMPATS,NUMVISIT,DIE
10 N VALMVNT,HDRCNT,DROOT,HROOT,X,BLINE
11 ;
12 S PPPMRT="VISHISTP_PPPPRT23"
13 S PRTFFXST=1017
14 S PRTFFXND=1018
15 S (VALMCNT,HDRCNT)=0
16 ;
17 S DROOT="^TMP(""PPPL6"",$J)"
18 S HROOT="^TMP(""PPPL6"",$J,""HDR"")"
19 S PPPARRY="^TMP(""PPP"",$J,""HIST"")"
20 ;
21 S TMP=$$LOGEVNT^PPPMSC1(PRTFFXST,PPPMRT,"STATION HISTOGRAMS")
22 D VISHISTA(PPPARRY)
23 ;
24 D HEADING1
25 D ORDER2
26 S X=$$SETSTR^VALM1(" ","",1,79) D TMP
27 S X=$$SETSTR^VALM1("Listing Complete.","",1,79) D TMP
28 K @PPPARRY
29 S TMP=$$LOGEVNT^PPPMSC1(PRTFFXND,PPPMRT)
30 Q
31 ;
32HEADING1 ; Write the page heading, Pause if a crt.
33 ;
34 S BLINE=$$SETSTR^VALM1(" ","",1,80)
35 ;
36 S X=BLINE D HDRTMP
37 S X=$$CENTER^PPPUTL1(BLINE,"Pharmacy Prescription Practices")
38 D HDRTMP
39 S X=$$CENTER^PPPUTL1(BLINE,"Foreign Facility Histograms")
40 D HDRTMP
41 S X=$$CENTER^PPPUTL1(BLINE,"Number of Stations Visited Vs. Number Of Patients")
42 D HDRTMP
43 S X=$$CENTER^PPPUTL1(BLINE,"As Of --> "_$$I2EDT^PPPCNV1(DT))
44 D HDRTMP
45 Q
46 ;
47ORDER2 ;
48 ;
49 F NUMVIS=0:0 D Q:NUMVIS'>0
50 .S NUMVIS=$O(@PPPARRY@(NUMVIS)) Q:NUMVIS'>0
51 .S NUMPATS=@PPPARRY@(NUMVIS)
52 .I NUMPATS>(IOM-20) S NUMPATS=(IOM-20)
53 .S STARS=""
54 .F I=1:1:NUMPATS S STARS=STARS_"*"
55 .S X=$$SETSTR^VALM1($E(NUMVIS_" ",1,3)_" -|- "_STARS_" ("_@PPPARRY@(NUMVIS)_")","",1,79)
56 .D TMP
57 Q
58 ;
59VISHISTA(TMPARY) ;
60 ;
61 N STAPTR,STANUM,PATDFN
62 ;
63 S (TPATS,TVIS,TSTA)=0
64 F PATDFN=0:0 D Q:PATDFN=""
65 .S PATDFN=$O(^PPP(1020.2,"APOV",PATDFN)) Q:PATDFN=""
66 .S NUMVISIT=0
67 .S TPATS=TPATS+1
68 .F STAPTR=0:0 D Q:STAPTR=""
69 ..S STAPTR=$O(^PPP(1020.2,"APOV",PATDFN,STAPTR)) Q:STAPTR=""
70 ..S NUMVISIT=NUMVISIT+1
71 ..S TVIS=TVIS+1
72 ..I '$D(@TMPARY@("STA",STAPTR)) D
73 ...S @TMPARY@("STA",STAPTR)=""
74 ...S TSTA=TSTA+1
75 .S @TMPARY@(NUMVISIT)=+$G(@TMPARY@(NUMVISIT))+1
76 Q
77 ;
78TMP ; -- Sets up data display array
79 S VALMCNT=VALMCNT+1
80 S @DROOT@(VALMCNT,0)=$E(X,1,79)
81 QUIT
82 ;
83HDRTMP ; -- Sets up header display array
84 S HDRCNT=HDRCNT+1
85 S @HROOT@(HDRCNT)=$E(X,1,79)
86 QUIT
87 ;
Note: See TracBrowser for help on using the repository browser.