Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ADERFLG

ADERFLG.m

Go to the documentation of this file.
  1. ADERFLG ; IHS/HQT/MJL - RESET DENTAL EXTRACT FLAG ; [ 03/24/1999 9:04 AM ]
  1. ;;6.0;ADE;;APRIL 1999
  1. ;ORIG (ADEXFLGR) MLQ/DM-DPSB
  1. W !!,"This routine (ADERFLG) should not be entered at the top.",!!
  1. Q
  1. RESETA ; THIS ENTRY POINT WILL CLEAR DPSC FLAG IN ALL RECORDS
  1. ; Entry point not called from within dental package. For programmer
  1. ; diagnostic and troubleshooting use only.
  1. D ^XBKVAR
  1. W !!,"This will clear date stamps for ALL records from which data has been extracted.",!
  1. ASK ;
  1. R "Ok to continue? N// ",X:DTIME S:'$T X="^" S X=$E(X_"N")
  1. I X["?" W !,"Records from which data has been extracted are marked with the date the",!,"extraction was performed so that they will not be processed again for",!,"transmission to Area/DPSB. You will lose that indicator if you proceed.",! G ASK
  1. I "Yy"'[X W " -- reset canceled",! Q
  1. W !,"Beginning reset.",!
  1. F %=0:0 S ADERDV=$O(^ADEPCD("AI",0)) Q:ADERDV="" W ADERDV," " D RESET2
  1. W "Done!",!
  1. Q
  1. ;
  1. RESET1 ; THIS ENTRY POINT WILL ASK FOR A DATE FOR WHICH THE
  1. ; DPSC FLAG IS TO BE RESET
  1. ; Entry point not called from within dental package. For programmer
  1. ; diagnostic and troubleshooting use only.
  1. D ^XBKVAR
  1. S %DT="EX"
  1. R "Date for which DPSC flag is to be reset: ",X:DTIME
  1. Q:'$T
  1. Q:X=""!(X["^")
  1. I X["?" W !,"Dates of prior extractions:",! X "S ADED=0 F S ADED=$O(^ADEPCD(""AI"",ADED)) Q:'+ADED W ?3,$E(ADED,4,5),""-"",$E(ADED,6,7),""-"",$E(ADED,2,3),!" G RESET1
  1. D ^%DT W !
  1. Q:Y<0
  1. S ADERDV=Y
  1. D RESET2
  1. Q
  1. ;
  1. RESET2 ;EP
  1. ; THIS ENTRY EXPECTS ADERDV AND REMOVES THE CORRESPONDING
  1. ; EXTRACT FLAGS - Called by "Re-extraction" process of ADEXSU
  1. N DA,DIE,DR
  1. Q:'$D(ADERDV)
  1. W !,"Please wait..."
  1. S DIE="^ADEPCD(",DA=0,DR="5///@"
  1. F S DA=$O(^ADEPCD("AI",ADERDV,DA)) Q:'+DA D
  1. . ;D ^DIE
  1. . S $P(^ADEPCD(DA,0),U,6)=""
  1. . K ^ADEPCD("AI",ADERDV,DA)
  1. ;
  1. W ADERDV," Reset.",!
  1. K ADERDV
  1. Q