source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS41.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1VAQDIS41 ;ALB/JRP/JFP - PRINT PROFILES;28APR92
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3PRINT(LONGFORM) ;PRINT PDX PHARMACY INFORMATION
4 ;INPUT :
5 ; LONGFORM - 1 = Print profile in long format (default)
6 ; 0 = Print profile in short format
7 ;
8 ;CHECK PARAMETERS
9 S VAQPOP=0
10 S:($G(LONGFORM)="") LONGFORM=1
11 ;
12 ; -- PRINT HEADER
13 S VAQLN=$$REPEAT^VAQUTL1("-",79)
14 S VAQCTR="< "_$S($P(VAQSEGND,"^",1)'="":$P(VAQSEGND,"^",1),1:"Segment Description Missing")_" >"
15 S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR)
16 D TMP^VAQDIS20,BLANK^VAQDIS20
17 K VAQLN,VAQCTR
18 ;
19 ; -- PRINT DEMOGRAPHICS
20 D DEMOG^VAQDIS42,BLANK^VAQDIS20
21 ; -- PHARMACY DATA EXIST
22 I '$D(@XTRCT@("VALUE",52,.01,0)) D NOPHAR QUIT 0
23 I $G(@XTRCT@("VALUE",52,.01,0))="" D NOPHAR QUIT 0
24 ; -- PRINT COLUMN HEADINGS FOR SHORT FORMAT
25 I ('LONGFORM) D
26 .S X=$$SETSTR^VALM1("RX#","",1,7)
27 .S X=$$SETSTR^VALM1("DRUG",X,8,37)
28 .S X=$$SETSTR^VALM1("STAT",X,45,5)
29 .S X=$$SETSTR^VALM1("QTY",X,51,5)
30 .S X=$$SETSTR^VALM1("ISSUED",X,56,10)
31 .S X=$$SETSTR^VALM1("LAST FILL",X,66,10)
32 .S X=$$SETSTR^VALM1("REM",X,76,3)
33 .D TMP^VAQDIS20
34 .D SHORT^VAQDIS43
35 ; -- PRINT LONG FORM
36 I (LONGFORM) D
37 .D LONG^VAQDIS43
38FOOT ; -- PRINT FOOTER
39 I 'VAQPOP D
40 .S VAQLN=$$REPEAT^VAQUTL1(" ",79)
41 .S VAQCTR="***** The above is PDX Pharmacy Information and should be used accordingly *****"
42 .S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR) D TMP^VAQDIS20
43 ; -- Clean up
44 K VAQLN,VAQCTR,VAQPOP,LONGFORM
45 QUIT 0
46NOPHAR ; -- No pharmacy data
47 S VAQMSG="*** There is no Pharmacy Information..."
48 S X=$$SETSTR^VALM1(VAQMSG,"",1,79)
49 D TMP^VAQDIS20
50 K VAQMSG
51 QUIT
52 ;
Note: See TracBrowser for help on using the repository browser.