source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/VAFCMGA1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 5.0 KB
Line 
1VAFCMGA1 ;BIR/LTL-DEMOGRAPHIC MERGE SCREEN ACTIONS cont. ;24 Sep 96
2 ;;5.3;Registration;**149,477**;Aug 13, 1993
3 ;
4 ;NOTE: The VAFCMGA* routines contain line tags used to implement
5 ; the actions of a List Manager user interface. All line
6 ; tags assume that the following variables and arrays are
7 ; defined.
8 ;
9 ;Input : VAFCDFN - Pointer to entry in PATIENT file (#2) to merge
10 ; data into
11 ; VAFCARR - Array contain data to merge (full global reference)
12 ; VAFCARR() should be set as follows:
13 ; VAFCARR(File,Field) = Value
14 ; Where File = File number Value is from
15 ; Field = Field number Value is from
16 ; Value = Info to merge
17 ; Notes: Dates must be in FileMan format
18 ; : Special considerations for Value
19 ; "@" - Displays <Data Deleted> and deletes
20 ; local value if merged
21 ; "^text" - Displays text and ignores
22 ; field if merged
23 ; NULL - Displays <No Data Found> and
24 ; ignores field if merged
25 ; Doesn't exist - Displays <UR>
26 ; and ignores field
27 ; if merged
28 ; VAFCFROM - Text denoting where merge data cam from (1-35)
29 ; VAFCEVDT - Date/time merge data was instantiated (FileMan)
30 ; All variables set by List Manager Interface
31 ; Display area and variables required List Manager interface
32 ; Display
33 ; VALMAR(Line,0) = Line of text in display
34 ; Indexes
35 ; VALMAR("IDX",Line,Entry) = ""
36 ; VALMAR("E2F",Entry,N) = File^Field
37 ; N => Allows for multiple fields per entry (starts with 1)
38 ; VALMAR("E2G",Entry) = Group entry is contained in
39 ; VALMAR("GRP",Group) = First line of group in display
40 ; Note: The E2F and E2G indexes are only set if the data
41 ; to merge does not match the local data
42 ;
43UNDO ;Undo selected merges
44 ;
45 ;Input : See above note on input variables
46 ;Output : VALMAR() array will be rebuilt accordingly
47 ;
48 ;Declare variables
49 N VAFCDOTS
50 N ENTRY,IENS,FDAROOT,MSGROOT,QUOTE
51 S FDAROOT="^TMP(""VAFC-UNDO"","_$J_",""FDA"")"
52 S MSGROOT="^TMP(""VAFC-UNDO"","_$J_",""MSG"")"
53 S QUOTE=$C(34)
54 S IENS=VAFCDFN_","
55 I '$O(@FDAROOT@(0)) S VALMSG="You haven't merged anything yet?!" G UNDOQ
56 ;undo
57 S VALMSG="Merge undone."
58 N DGNOFDEL S DGNOFDEL=1 ;**477 stop NOK Name x-ref from firing.
59 ;NEW EASZIPLK S EASZIPLK=1 ;**477 zipcode lookup for GMT
60 D FILE^DIE("E",FDAROOT,MSGROOT)
61 ;Rebuild required portion of display
62 S VAFCDOTS=1
63 F ENTRY=1:1:4 D RBLDGRP^VAFCMGB(ENTRY)
64 ;No more differences
65 S:('$D(@VALMAR@("E2F"))) VALMSG="** No differences found **"
66 ;Done - refresh List Manager display
67UNDOQ K @FDAROOT,@MSGROOT S VALMBCK="R"
68 Q
69 ;
70PDAT ;remote pdat ;**477
71 NEW DFN,ICN,VAFCDEL,VAFCDIR,VAFCFILE
72 S DFN=VAFCDFN
73 S ICN=+$$GETICN^MPIF001(DFN)
74 S VALMBCK="" ;clear bottom portion of screen and prompt for action
75 S VAFCDIR=$$GET^XPAR("SYS","VAFC HFS SCRATCH") ;hfs directory
76 S VAFCFILE="VAFC"_DUZ_".DAT" ;file name for local pdat
77 S IOM=132,IOSL=99999,IOST="P-DUMMY",IOF=""""""
78 D OPEN^%ZISH("VAFC",VAFCDIR,VAFCFILE,"W") Q:POP ;open up file
79 U IO
80 I ICN'="" D START^VAFCPDAT ;local pdat to file
81 D CLOSE^%ZISH("VAFC") ;close up file
82 K ^TMP("RGPDAT",$J) ;global array to hold pdat for listman
83 S X=$$FTG^%ZISH(VAFCDIR,VAFCFILE,$NAME(^TMP("RGPDAT",$J,1)),3) ;file to global
84 S VAFCDEL(VAFCFILE)="" ;list of file(s) to delete
85 S X=$$DEL^%ZISH(VAFCDIR,$NA(VAFCDEL)) ;delete file
86 I $D(^TMP("RGPDAT",$J)) D EN^RGEX04 ;list manager for remote pdat
87 S VALMBCK="R" ;refresh screen
88 Q
89 ;
90RAUD ;remote audit ;**477
91 NEW DFN,ICN,VAFCBDT,VAFCEDT,VAFCDEL,VAFCDIR,VAFCFILE
92 S DFN=VAFCDFN
93 S ICN=+$$GETICN^MPIF001(DFN)
94 S VALMBCK="" ;clear bottom portion of screen and prompt for action
95 D ASK2^VAFCAUD I '$G(VAFCBDT)!'$G(VAFCEDT) Q ;date range of local and remote audits
96 S VAFCDIR=$$GET^XPAR("SYS","VAFC HFS SCRATCH") ;hfs directory
97 S VAFCFILE="VAFC"_DUZ_".DAT" ;file name for local audit
98 S IOM=132,IOSL=99999,IOST="P-DUMMY",IOF=""""""
99 D OPEN^%ZISH("VAFC",VAFCDIR,VAFCFILE,"W") Q:POP ;open up file
100 U IO
101 I '$O(^DIA(2,"B",DFN,0)) W !,"This patient has no audit data available."
102 I $O(^DIA(2,"B",DFN,0)) S QFLG=1,RPCFLG=1 D START^VAFCAUD(DFN,VAFCBDT,VAFCEDT,RPCFLG) ;local audit to file
103 D CLOSE^%ZISH("VAFC") ;close up file
104 K ^TMP("VAFCRAUD",$J) ;global array to hold audit for listman
105 S X=$$FTG^%ZISH(VAFCDIR,VAFCFILE,$NAME(^TMP("VAFCRAUD",$J,1)),3) ;file to global
106 S VAFCDEL(VAFCFILE)="" ;list of file(s) to delete
107 S X=$$DEL^%ZISH(VAFCDIR,$NA(VAFCDEL)) ;delete file
108 I $D(^TMP("VAFCRAUD",$J)) D EN^VAFCLAU ;list manager for remote audit
109 S VALMBCK="R" ;refresh screen
110 Q
Note: See TracBrowser for help on using the repository browser.