source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMETHL.m@ 940

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PXRMETHL ; SLC/PKR/PJH - Reminder Extract Transmissions; 12/09/2003
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;
4 ;Main entry point for PXRM EXTRACT TRANSMISSIONS
5START(IEN) N VALMBCK,VALMCNT,VALMSG,X,XMZ,XQORM,XQORNOD
6 ;Details of last run
7 N DATA,NPERIOD,NSDATE,NTASK
8 S DATA=$G(^PXRM(810.2,IEN,0))
9 ;S NPERIOD=$P(DATA,U,6),NSDATE=$P(DATA,U,7),NTASK=$P(DATA,U,8)
10 S NPERIOD=$P(DATA,U,6),NSDATE=$P(DATA,U,7)
11 S VALMCNT=0
12 D EN^VALM("PXRM EXTRACT TRANSMISSIONS")
13 Q
14 ;
15BLDLIST ;Build workfile
16 K ^TMP("PXRMETHL",$J)
17 ;List of HL7 transmissions in reverse date order
18 N ID,SUB,XDATE,XSTATUS
19 S ID=""
20 F S ID=$O(^PXRMXT(810.3,IEN,5,"B",ID),-1) Q:ID="" D
21 .S SUB=$O(^PXRMXT(810.3,IEN,5,"B",ID,"")) Q:'SUB
22 .S XDATE=$P($G(^PXRMXT(810.3,IEN,5,SUB,0)),U,2)
23 .S XSTATUS=$$STATUS^PXRM7API(ID)
24 .I 'XDATE S XDATE="Not Transmitted",XSTATUS=""
25 .S VALMCNT=VALMCNT+1
26 .S ^TMP("PXRMETHL",$J,VALMCNT,0)=$$FRE(ID,XDATE,XSTATUS)
27 Q
28 ;
29FRE(ID,DATE,STATUS) ;Format entry number, name, date created
30 N TDATE,TEMP,TID,TSTATUS
31 S TID=$E(ID,1,13)
32 S TEMP=" "_$$LJ^XLFSTR(TID,16," ")
33 S TDATE=$$FMTE^XLFDT(DATE,"5Z")
34 S TEMP=TEMP_" "_$$LJ^XLFSTR(TDATE,20," ")
35 S TSTATUS=$E(STATUS,1,38)
36 S TEMP=TEMP_" "_$$LJ^XLFSTR(TSTATUS,38," ")
37 Q TEMP
38 ;
39ENTRY ;Entry code
40 D BLDLIST
41 Q
42 ;
43EXIT ;Exit code
44 K ^TMP("PXRMETHL",$J)
45 D CLEAN^VALM10
46 D FULL^VALM1
47 S VALMBCK="Q"
48 Q
49 ;
50HDR ; Header code
51 S VALMHDR(2)=" Extract Summary Name: "_$P($G(^PXRMXT(810.3,IEN,0)),U)
52 S VALMHDR(3)=" Date Created: "_$$FMTE^XLFDT($P($G(^PXRMXT(810.3,IEN,0)),U,6),"5Z")
53 S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
54 Q
55 ;
56INIT ;Initialization code
57 S VALMCNT=0
58 Q
Note: See TracBrowser for help on using the repository browser.