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

NURACUIT.m

Go to the documentation of this file.
  1. NURACUIT ;HIRMFO/MD-ROUTINE TO REPAIR FUTURE ACUITY DATA FROM ERRONEOUS BATCH RUN
  1. ;;4.0;NURSING SERVICE;;Apr 25, 1997
  1. ; This routine should be run in the event the Nursing AMIS Acuity
  1. ; Separation/Activation batch job erroneously creates future data
  1. ; entries in the NURS AMIS Daily Exception Report (#213.5), NURS AMIS
  1. ; 1106 Manhours (#213.4) and NURS Parameters (#213.9) files.
  1. ;
  1. D EN1,EN2,EN3
  1. W !,"Done"
  1. KILL ;
  1. K DA,DIK,NURSX,RUNDATE,X,Y
  1. Q
  1. EN1 ; Remove future date entries from the unclassified report (#213.5) file.
  1. ; There should be no unclassified report file entries later than T-1.
  1. ;
  1. W !,"Removing future date entries from the NURS AMIS Daily Exception Report",!,"(#213.5) file"
  1. S X="T-1" D ^%DT S RUNDATE=Y
  1. I +$G(RUNDATE) S NURSX=0,DIK="^NURSA(213.5," F S NURSX=$O(^NURSA(213.5,"B",NURSX)) Q:NURSX'>0 I NURSX>RUNDATE S DA=0 F S DA=$O(^NURSA(213.5,"B",NURSX,DA)) Q:'DA D ^DIK W "."
  1. G KILL
  1. EN2 ; Remove acuity data from future date entries in manhours file (#213.4).
  1. ;
  1. W !,"Removing acuity data from future date entries in the NURS AMIS 1106 Manhours",!,"file (#213.4)"
  1. S NURSX=DT_"A"
  1. I $G(NURSX)'="" F S NURSX=$O(^NURSA(213.4,"B",NURSX)) Q:NURSX="" S DA(1)=0 F S DA(1)=$O(^NURSA(213.4,"B",NURSX,DA(1))) Q:DA(1)'>0 D
  1. .S DA=0 F S DA=$O(^NURSA(213.4,DA(1),1,DA)) Q:DA'>0 D
  1. ..S DIK="^NURSA(213.4,DA(1),1,"
  1. ..D ^DIK W "."
  1. ..Q
  1. .Q
  1. G KILL
  1. EN3 ; Reset Date node in site parameter file to current date if date is
  1. ; in the future.
  1. ;
  1. W !,"Resetting ^DIC(213.9,1,""DATE"") to today's date if it is a future date."
  1. I +$G(^DIC(213.9,1,"DATE"))>DT S $P(^DIC(213.9,1,"DATE"),"^")=DT
  1. G KILL