source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURACUIT.m@ 1154

Last change on this file since 1154 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1NURACUIT ;HIRMFO/MD-ROUTINE TO REPAIR FUTURE ACUITY DATA FROM ERRONEOUS BATCH RUN
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ; This routine should be run in the event the Nursing AMIS Acuity
4 ; Separation/Activation batch job erroneously creates future data
5 ; entries in the NURS AMIS Daily Exception Report (#213.5), NURS AMIS
6 ; 1106 Manhours (#213.4) and NURS Parameters (#213.9) files.
7 ;
8 D EN1,EN2,EN3
9 W !,"Done"
10KILL ;
11 K DA,DIK,NURSX,RUNDATE,X,Y
12 Q
13EN1 ; Remove future date entries from the unclassified report (#213.5) file.
14 ; There should be no unclassified report file entries later than T-1.
15 ;
16 W !,"Removing future date entries from the NURS AMIS Daily Exception Report",!,"(#213.5) file"
17 S X="T-1" D ^%DT S RUNDATE=Y
18 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 "."
19 G KILL
20EN2 ; Remove acuity data from future date entries in manhours file (#213.4).
21 ;
22 W !,"Removing acuity data from future date entries in the NURS AMIS 1106 Manhours",!,"file (#213.4)"
23 S NURSX=DT_"A"
24 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
25 .S DA=0 F S DA=$O(^NURSA(213.4,DA(1),1,DA)) Q:DA'>0 D
26 ..S DIK="^NURSA(213.4,DA(1),1,"
27 ..D ^DIK W "."
28 ..Q
29 .Q
30 G KILL
31EN3 ; Reset Date node in site parameter file to current date if date is
32 ; in the future.
33 ;
34 W !,"Resetting ^DIC(213.9,1,""DATE"") to today's date if it is a future date."
35 I +$G(^DIC(213.9,1,"DATE"))>DT S $P(^DIC(213.9,1,"DATE"),"^")=DT
36 G KILL
Note: See TracBrowser for help on using the repository browser.