source: WorldVistAEHR/trunk/r/MY_HEALTHEVET-MHV/MHVXRXR.m@ 1704

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

revised back to 6/30/08 version

File size: 1.0 KB
Line 
1MHVXRXR ;WAS/GPM - Prescription refill request ; [8/23/05 12:34am]
2 ;;1.0;My HealtheVet;;Aug 23, 2005
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 Q
6 ;
7REQUEST(QRY,ERR,DATAROOT) ; Entry point to extract appointment data
8 ; Retrieves requested appointment data and returns it in DATAROOT
9 ;
10 ; Integration Agreements:
11 ; 3768 : AP1^PSOPRA
12 ;
13 ; Input:
14 ; QRY - Query array
15 ; QRY(DFN) - (required) Pointer to PATIENT (#2) file
16 ; DATAROOT - Root of array to hold extract data
17 ;
18 ; Output:
19 ; DATAROOT - Populated data array, includes # of hits
20 ; ERR - Errors during extraction
21 ;
22 N CNT,RX,PORDERN,ORDERTM,STATUS,DIV,DFN,U
23 ;
24 D LOG^MHV7U("MHVXRXR","BEGIN","S",0)
25 S U="^"
26 S ERR=0
27 K @DATAROOT
28 S DFN=$G(QRY("DFN"))
29 ;
30 F CNT=1:1 Q:'$D(QRY("RX",CNT)) D
31 . S RX=$G(QRY("RX",CNT))
32 . S PORDERN=$P(RX,"^",2)
33 . S ORDERTM=$P(RX,"^",3)
34 . S RX=$P(RX,"^")
35 . S STATUS=$$AP1^PSOPRA(DFN,RX)
36 . S @DATAROOT@(CNT)=RX_U_STATUS_U_PORDERN_U_ORDERTM
37 . Q
38 ;
39 S @DATAROOT=CNT-1
40 D LOG^MHV7U("MHVXRXR","END","S",0)
41 Q
Note: See TracBrowser for help on using the repository browser.