source: WorldVistAEHR/trunk/r/PHARMACY_PRESCRIPTION_PRACTICE-PPP/PPPEDT13.m@ 1685

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1PPPEDT13 ;ALB/JFP - EDIT FF XREF ROUTINE ;5/19/92
2 ;;V1.0;PHARMACY PRESCRIPTION PRACTICE;;APR 7,1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; These routines control the display of foreign facility
6 ; data via the list processor (Expand Entry).
7 ;
8EXPAND ; -- Displays FFX data for entry
9 ;
10 N VALMY,SDI,SDAT,FFXIFN,ERR,TMP
11 ;
12 D EN^VALM2($G(XQORNOD(0)),"S")
13 Q:'$D(VALMY)
14 S SDI=""
15 S SDI=$O(VALMY(SDI)) Q:SDI=""
16 S SDAT=$G(@IDXARRAY@(SDI))
17 S FFXIFN=$P(SDAT,U,2)
18 S ERR=$$EXP^PPPEDT13(FFXIFN)
19 S VALMBCK="R"
20 Q
21 ;
22EXP(FFXIFN) ; List processor entry point
23 ;
24 ; This is the main entry point for calling the list processor.
25 ;
26 ; Parameters:
27 ; FFXIFN - The FFX internal entry number
28 ;
29 N ARRAYNM,LSTARRAY,VALMCNT
30 ;
31 ; K XQORS,VALMEVL ; (only kill on the first screen in)
32 D EN^VALM("PPP FFX DISPLAY")
33 Q 1
34 ;
35INIT ; Collect all of the data and build the display array
36 ;
37 N PPPCNT,ERR,PARMERR
38 ;
39 S PARMERR=-9001
40 S ARRAYNM="^TMP(""PPPTMP"",$J)"
41 S LSTARRAY="^TMP(""PPPL2"",$J)"
42 ;
43 K @ARRAYNM,@LSTARRAY
44 ;
45 S (VALMCNT)=0
46 S ERR=$$GETFFX^PPPGET1(FFXIFN,ARRAYNM)
47 I ERR<0 D Q
48 .W !,*7,"An Unexpected Error Occurred...check error log"
49 .R !,"Press <RETURN> to exit...",TMP:DTIME
50 .S TMP=$$LOGEVNT^PPPMSC1(ERR,"INIT_PPPEDT13","GETFFX")
51 E D
52 .; - Format data for display
53 .S VALMCNT=$$SETD(FFXIFN,ARRAYNM,VALMCNT)
54 .I VALMCNT<1 D NUL
55 Q
56 ;
57NUL ; Set null message
58 S @LSTARRAY@(1,0)=" "
59 S @LSTARRAY@(2,0)=" No Data found for the patient entered...<RETURN> to exit"
60 S VALMCNT=2
61 Q
62 ;
63FNL ; Clean Up
64 ;
65 K @ARRAYNM,@LSTARRAY
66 Q
67 ;
68SETD(FFXIFN,TARRY,CNT) ; Sets up display line for list processor
69 ;
70 N PARMERR,TXTLINE
71 ;
72 S PARMERR=-9001
73 ;
74 I '$D(TARRY) Q PARMERR
75 I '$D(CNT) Q PARMERR
76 I '$D(@TARRY@(FFXIFN)) Q PARMERR
77 ;
78 S TXTLINE=""
79 ;S @LSTARRAY@(1,0)="IFN : "_FFXIFN
80 S @LSTARRAY@(1,0)=" "
81 S @LSTARRAY@(2,0)="Entry Date : "_$G(@TARRY@(FFXIFN,"ED"))
82 S @LSTARRAY@(3,0)="Entry Source: "_$G(@TARRY@(FFXIFN,"SOURCE"))
83 S @LSTARRAY@(4,0)=""
84 S TXTLINE=$$SETSTR^VALM1("Patient Name: "_$G(@TARRY@(FFXIFN,"NAME")),"",1,38)
85 S TXTLINE=$$SETSTR^VALM1("SSN: "_$G(@TARRY@(FFXIFN,"SSN")),TXTLINE,40,39)
86 S @LSTARRAY@(5,0)=TXTLINE,TXTLINE=""
87 S TXTLINE=$$SETSTR^VALM1("Station: "_$G(@TARRY@(FFXIFN,"POV")),"",1,38)
88 S TXTLINE=$$SETSTR^VALM1("Domain: "_$G(@TARRY@(FFXIFN,"DOMAIN")),TXTLINE,40,39)
89 S @LSTARRAY@(6,0)=TXTLINE,TXTLINE=""
90 S TXTLINE=$$SETSTR^VALM1("Last Visit Date: "_$G(@TARRY@(FFXIFN,"LVD")),"",1,40)
91 S TXTLINE=$$SETSTR^VALM1("Last Batch Request: "_$G(@TARRY@(FFXIFN,"LBRD")),TXTLINE,40,39)
92 S @LSTARRAY@(7,0)=TXTLINE,TXTLINE=""
93 S TXTLINE=$$SETSTR^VALM1("Last PDX Date: "_$G(@TARRY@(FFXIFN,"LPDX")),"",1,40)
94 S TXTLINE=$$SETSTR^VALM1("Status: "_$G(@TARRY@(FFXIFN,"STATUS")),TXTLINE,40,39)
95 S @LSTARRAY@(8,0)=TXTLINE
96 S CNT=CNT+8
97 Q CNT
98 ;
99SETL ; -- Sets up list manager display array
100 S VALMCNT=VALMCNT+1
101 S @LSTARRAY@(VALMCNT,0)=$E(TXTLINE,1,79)
102 Q
103 ;
Note: See TracBrowser for help on using the repository browser.