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

ACHSYPVR.m

Go to the documentation of this file.
  1. ACHSYPVR ; IHS/ITSC/PMF - RESET CHS TX DATE IN IHS PATIENT & VENDOR FILE ; [ 10/16/2001 8:16 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
  1. ;
  1. ; This utility resets export-control fields in the PATIENT and
  1. ; VENDOR file. Those fields are checked during CHS export to
  1. ; determine if a VENDOR or PATIENT has been edited since the last
  1. ; CHS export. If they have been edited, VENDOR and PATIENT info is
  1. ; exported to the Fiscal Intermediary.
  1. ;
  1. ; Reset CHS TX DATE in Patient & Vendor files.
  1. ;
  1. ; This will flag EVERY patient and vendor for export in the next
  1. ; CHS export. You could get some very big export files.
  1. ;
  1. ; Kernel variables need to be defined.
  1. ;
  1. START ;EP
  1. I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." Q
  1. I '$G(DUZ(2)) W !,"DUZ(2) UNDEFINED OR 0." Q
  1. I '$D(^XUSEC("XUMGR",DUZ)) W !,"You're not a manager." Q
  1. D HOME^%ZIS,DT^DICRW
  1. W @IOF,$$REPEAT^XLFSTR("*",70)
  1. W !,$$C^XBFUNC("RESET CHS TX DATE IN PATIENT & VENDOR FILES",80),!
  1. W $$REPEAT^XLFSTR("*",70),!!
  1. A1 ;
  1. Q:'$$DIR^XBDIR("Y","Are You SURE you want to RESET the CHS TX DATE ","N")
  1. Q:$D(DUOUT)!$D(DTOUT)
  1. W !!,"Please be PATIENT -- This process could take a while",!!
  1. N C,N,R,I
  1. S N=$P(^AUPNPAT(0),U,4)
  1. A2 ;
  1. W "Resetting Patient CHS TX DATE in ",N," NODES",!
  1. S (R,C)=0,DX=$X,DY=$Y
  1. A3 ;
  1. F S R=$O(^AUPNPAT(R)) Q:'R I $D(^AUPNPAT(R,0)) S $P(^(0),U,15)="",C=C+1 X IOXY W $J(C,8)," of ",$J(N,8)
  1. ;
  1. W !!,"Number of Patient Nodes Reset = ",C,!!
  1. VEND ;
  1. S N=$P(^AUTTVNDR(0),U,4)
  1. W "Resetting Vendor CHS TX DATE in ",N," NODES",!
  1. S (R,C)=0,DX=$X,DY=$Y
  1. ;
  1. F S R=$O(^AUTTVNDR(R)) Q:'R I $D(^AUTTVNDR(R,11)) S $P(^(11),U,12)="",C=C+1 X IOXY W $J(C,8)," of ",$J(N,8)
  1. ;
  1. W !!,"Number of Vendor Nodes Reset = ",C,!!!,"JOB COMPLETED"
  1. ;
  1. Q