source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/VAFCEHLM.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: 3.4 KB
Line 
1VAFCEHLM ;ALB/JLU,LTL-FILE UTILITIES FOR 391.98 ;12/07/00
2 ;;5.3;Registration;**149,255,307,333,477**;Aug 13, 1993
3 ;
4 ;Reference to VTQ^MPIFSAQ supported by IA #2941
5 ;
6EN ; -- main entry point for VAFC EXCPT SUM SCR
7 ;fix records stuck in 'being reviewed' status
8 S IEN=0 F S IEN=$O(^DGCN(391.98,"AST",5,IEN)) Q:'IEN D ;**255
9 . L +^DGCN(391.98,IEN,0):0 I '$T Q ;record is truly being reviewed
10 . S XX=$$EDIT^VAFCEHU1(IEN,"AR") ;change record to action required
11 . L -^DGCN(391.98,IEN,0)
12 L +^DGCN(391.98,"VAFC PDR PURGE"):0 I '$T W $C(7),!!,"The Purge Patient Data Reviews process is currently running." QUIT
13 L -^DGCN(391.98,"VAFC PDR PURGE")
14 D EN^VALM("VAFC EXCPT SUM SCR")
15 Q
16 ;
17HDR ; -- header code
18 N RGSTRNG
19 S RGSTRNG="Review(s) currently on file."
20 S VALMHDR(1)=$$CENTER(RGSTRNG)
21 Q
22 ;
23INIT ; -- init variables and list array
24 ;checking for sort variable
25 N XQORNOD
26 I '$D(VAFCSORT) S VAFCSORT="SN"
27 ;
28INIT2 ;enter at this point to reset the screens after editing etc.
29 K @VALMAR
30 D SORTS^VAFCEHU2(VAFCSORT,VALMAR)
31 D FORMAT^VAFCEHU2(VALMAR,.VALMCNT,.VALMQUIT)
32 Q
33 ;
34HELP ; -- help code
35 S X="?",VALMSG="Select patient for detailed display or change sorting"
36 D DISP^XQORM1 W !!
37 Q
38 ;
39EXIT ; -- exit code
40 K @VALMAR,VAFCSORT
41 Q
42 ;
43EXPND ; -- expand code
44 Q
45 ;
46SACT D HDR
47 D INIT
48 S VALMBCK="R"
49 Q
50 ;
51FULL S VALMSG="** = Different, -> = Edited, <UR> = Unresolved" D REVFUL^VAFCEHU2
52 S VALMBCK="R"
53 Q
54 ;
55DIFF S VALMBCK="R"
56 Q
57 ;
58INQ ; Patient Inquiry ;**255
59 N DFN
60 S DFN=+$P($G(^DGCN(391.98,IENPDR,0)),"^",1) ;**477
61 S VALMBCK=""
62 D FULL^VALM1
63 D EN^DGRPD
64 D PAUSE^VALM1
65 S VALMBCK="R"
66 Q
67 ;
68DISP ; Display Only Query to MPI ;**307
69 S VALMBCK=""
70 D FULL^VALM1
71 S MPIVAR("DFN")=$P(EXCPT,"^",1)
72 S MPIVAR("SSN")=$P($G(^DPT(+$P(EXCPT,"^",1),0)),"^",9)
73 S MPIVAR("NM")=$P($G(^DPT(+$P(EXCPT,"^",1),0)),"^",1)
74 S MPIVAR("DOB")=$P($P($G(^DPT(+$P(EXCPT,"^",1),0)),"^",3),".",1)
75 D VTQ^MPIFSAQ(.MPIVAR)
76 D PAUSE^VALM1
77 S VALMBCK="R"
78 K MPIVAR
79 Q
80 ;
81PDAT ;report to list CMOR, TF's & SUB's ;**333
82 N DFN
83 S DFN=+$P($G(^DGCN(391.98,IEN,0)),"^",1)
84 S VALMBCK=""
85 D FULL^VALM1
86 D START^VAFCPDAT
87 ;D PAUSE^VALM1
88 S VALMBCK="R"
89 Q
90 ;
91CENTER(STRG) ;
92 ;
93 N LEN,FIL,FIL1
94 S LEN=80-$L(STRG)
95 S FIL=LEN/2
96 S $P(FIL1," ",FIL)=""
97 Q FIL1_STRG
98 ;
99PDRPRG ;Purge PDRs ;**477
100 L +^DGCN(391.98,"VAFC PDR PURGE"):0 I '$T W $C(7),!!,"The Purge Patient Data Reviews process is currently running." Q
101 L -^DGCN(391.98,"VAFC PDR PURGE")
102 N TDATE,MAXDT,PDATE,X1,X2,X,Y
103 S NDATE=""
104 D NOW^%DTC S TDATE=X
105 S X1=TDATE,X2=-30 D C^%DTC
106 S (Y,MAXDT)=X D DD^%DT S PDATE=Y
107 S DIR("?")="Enter a date at least 30 days in the past."
108 S DIR("A")="Purge all Patient Data Reviews prior to "
109 S DIR("B")=PDATE,DIR(0)="DAO^:"_MAXDT_":EPX" D ^DIR K DIR Q:$D(DIRUT)
110 S NDATE=Y
111 S DIR(0)="YA",DIR("B")="NO"
112 S DIR("A")="Are you sure you want to purge Patient Data Reviews? " D ^DIR K DIR Q:$D(DIRUT)
113 Q:Y=0
114 ;
115 N ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTSAVE,ZTREQ
116 S ZTRTN="QPRG^VAFCEHLM",ZTDESC="PURGE PATIENT DATA REVIEWS OVER 30 DAYS OLD OR X DAYS OLD AS SPECIFIED BY USER."
117 D NOW^%DTC
118 S ZTIO="",ZTDTH=%
119 I $D(DUZ) S ZTSAVE("DUZ")=DUZ,ZTSAVE("NDATE")=NDATE
120 D ^%ZTLOAD
121 W !!?15,"Patient Data Review Purge Queued, Task #"_ZTSK
122 D HOME^%ZIS K IO("Q")
123 Q
124QPRG ;
125 I $D(ZTQUEUED) S ZTREQ="@"
126 L +^DGCN(391.98,"VAFC PDR PURGE"):0 I '$T Q
127 N PDR,EVTDT,ERR S PDR=0,EVTDT=""
128 F S EVTDT=$O(^DGCN(391.98,"EVT",EVTDT)) Q:EVTDT>NDATE D
129 . F S PDR=$O(^DGCN(391.98,"EVT",EVTDT,PDR)) Q:'PDR D
130 .. S ERR=$$DELEXCPT^VAFCEHU1(PDR)
131 L -^DGCN(391.98,"VAFC PDR PURGE")
132 K NDATE
133 Q
Note: See TracBrowser for help on using the repository browser.