<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=Purge_Old_ACCESS%2FVERIFY_Codes</id>
	<title>Purge Old ACCESS/VERIFY Codes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=Purge_Old_ACCESS%2FVERIFY_Codes"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Purge_Old_ACCESS/VERIFY_Codes&amp;action=history"/>
	<updated>2026-04-27T15:40:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://vistapedia.com/index.php?title=Purge_Old_ACCESS/VERIFY_Codes&amp;diff=9337&amp;oldid=prev</id>
		<title>JohnLeoZ at 14:06, 15 August 2009</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Purge_Old_ACCESS/VERIFY_Codes&amp;diff=9337&amp;oldid=prev"/>
		<updated>2009-08-15T14:06:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This code snippet is intended to replace the routine call AOLD^XUSPURGE in Menu Option XUSERAOLD. Checks for Production system, and uses new code only if system is Testing.&lt;br /&gt;
&lt;br /&gt;
This allows clearing all codes if desired, Option XUSERAOLD can also be scheduled in Taskman if desired.&lt;br /&gt;
&lt;br /&gt;
 AOLD   ;; check whether Production or Testing&lt;br /&gt;
        If $$PROD^XUPROD DO AOLD^XUSPURGE QUIT  ;; If this is a production system, Keep the legacy 270 day minimum.&lt;br /&gt;
        ;&lt;br /&gt;
        N DIRUT,DIR,XUT,XUDAYS,XUDT,XUI,XUJ,XUK,X&lt;br /&gt;
        I $D(ZTQUEUED) D  Q&lt;br /&gt;
        . S X=$G(ZTQPARAM)-1 D A02^XUSPURGE(X),V02^XUSPURGE(X)&lt;br /&gt;
        . Q                ;; Option can be scheduled with number of days in Parameter field&lt;br /&gt;
        W !!,&amp;quot;This option will purge the log of inactive access and verify codes &amp;quot;,!&lt;br /&gt;
        W &amp;quot;older than the date specified to allow for their re-use.&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;A&amp;quot;)=&amp;quot;Do you wish to continue&amp;quot;,DIR(0)=&amp;quot;Y&amp;quot;,DIR(&amp;quot;B&amp;quot;)=&amp;quot;NO&amp;quot; D ^DIR&lt;br /&gt;
        I $D(DIRUT)!(Y&amp;#039;=1) K DIRUT,DIR,XUT,XUDAYS,XUDT,XUI,XUJ,XUK Quit&lt;br /&gt;
        S DIR(&amp;quot;?&amp;quot;)=&amp;quot;Enter a number of days indicating what date codes should be purged.&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;A&amp;quot;,1)=&amp;quot;   VHA has set the minimum time to keep old codes at 270 days.&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;A&amp;quot;,2)=&amp;quot;   But this not the VA...&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;A&amp;quot;,3)=&amp;quot;   And this is not a Production System.&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;A&amp;quot;)=&amp;quot;So how many days back do you wish to retain codes?&amp;quot;&lt;br /&gt;
        S DIR(&amp;quot;B&amp;quot;)=30      ;; default; was 270&lt;br /&gt;
        S DIR(0)=&amp;quot;N^0:400&amp;quot; ;; allowed range; was 270:400&lt;br /&gt;
        D ^DIR Q:$D(DIRUT)&lt;br /&gt;
        S X=X-1            ;; X=0 will leave Today.&lt;br /&gt;
        D A02^XUSPURGE(X),V02^XUSPURGE(X)&lt;br /&gt;
        Q&lt;/div&gt;</summary>
		<author><name>JohnLeoZ</name></author>
	</entry>
</feed>