[613] | 1 | PXQUTL3C ;ISL/JVS CLEAN OUT BAD XREF #4 ;5/7/98 09:53
|
---|
| 2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**29,51**;Aug 12, 1996
|
---|
| 3 | ;
|
---|
| 4 | ;
|
---|
| 5 | ;
|
---|
| 6 | Q
|
---|
| 7 | INDEX ;Reindex's the AA xref on the patient education file
|
---|
| 8 | ;Used as the Post Install for patch PX*1*51
|
---|
| 9 | D BMES^XPDUTL("Rebuilding 'AA' Cross-References on the V PATIENT EDUCATION File.")
|
---|
| 10 | D MES^XPDUTL("This might take a few minutes!")
|
---|
| 11 | N DIK
|
---|
| 12 | S DIK="^AUPNVPED("
|
---|
| 13 | S DIK(1)=".03^AA"
|
---|
| 14 | D ENALL^DIK
|
---|
| 15 | Q
|
---|
| 16 | ;
|
---|
| 17 | ;
|
---|
| 18 | T W !!,"Checking the V TREATMENT FILE #9000010.15 ",!
|
---|
| 19 | S TRTCNT=0
|
---|
| 20 | I Y="^" Q
|
---|
| 21 | S I="" F S I=$O(^AUPNVTRT("B",I)) Q:I="" D Q:Y="^"
|
---|
| 22 | . S IEN="" F S IEN=$O(^AUPNVTRT("B",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 23 | ..S ARRAY="^AUPNVTRT(""B"",I,IEN)" S TRTCNT=TRTCNT+1 I TRTCNT#1000=2 D MON^PXQUTL3B
|
---|
| 24 | ..I '$D(^AUPNVTRT(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVTRT(""B"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 25 | S I="" F S I=$O(^AUPNVTRT("AD",I)) Q:I="" D Q:Y="^"
|
---|
| 26 | . S IEN="" F S IEN=$O(^AUPNVTRT("AD",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 27 | ..S ARRAY="^AUPNVTRT(""AD"",I,IEN)" S TRTCNT=TRTCNT+1 I TRTCNT#1000=2 D MON^PXQUTL3B
|
---|
| 28 | ..I '$D(^AUPNVTRT(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVTRT(""AD"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 29 | S I="" F S I=$O(^AUPNVTRT("C",I)) Q:I="" D Q:Y="^"
|
---|
| 30 | . S IEN="" F S IEN=$O(^AUPNVTRT("C",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 31 | ..S ARRAY="^AUPNVTRT(""C"",I,IEN)" S TRTCNT=TRTCNT+1 I TRTCNT#1000=2 D MON^PXQUTL3B
|
---|
| 32 | ..I '$D(^AUPNVTRT(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVTRT(""C"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 33 | S I="" F S I=$O(^AUPNVTRT("AA",I)) Q:I="" D Q:Y="^"
|
---|
| 34 | . S IEN="" F S IEN=$O(^AUPNVTRT("AA",I,IEN)) Q:IEN="" D Q:Y="^"
|
---|
| 35 | ..S IENN="" F S IENN=$O(^AUPNVTRT("AA",I,IEN,IENN)) Q:IENN="" D Q:Y="^"
|
---|
| 36 | ...S ARRAY="^AUPNVTRT(""AA"",I,IEN,IENN)" S TRTCNT=TRTCNT+1 I TRTCNT#1000=2 D MON^PXQUTL3B
|
---|
| 37 | ...I '$D(^AUPNVTRT(IENN)) W !,"Entry "_IENN," IS NOT THERE! BAD REFERENCE IS ^AUPNVTRT(""AA"","_I_",",IEN_","_IENN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 38 | Q
|
---|
| 39 | ;
|
---|
| 40 | ;
|
---|
| 41 | P W !!,"Checking the V PATIENT ED FILE #9000010.16 ",!
|
---|
| 42 | S PEDCNT=0
|
---|
| 43 | I Y="^" Q
|
---|
| 44 | S I="" F S I=$O(^AUPNVPED("B",I)) Q:I="" D Q:Y="^"
|
---|
| 45 | . S IEN="" F S IEN=$O(^AUPNVPED("B",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 46 | ..S ARRAY="^AUPNVPED(""B"",I,IEN)" S PEDCNT=PEDCNT+1 I PEDCNT#1000=2 D MON^PXQUTL3B
|
---|
| 47 | ..I '$D(^AUPNVPED(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVPED(""B"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 48 | S I="" F S I=$O(^AUPNVPED("AD",I)) Q:I="" D Q:Y="^"
|
---|
| 49 | . S IEN="" F S IEN=$O(^AUPNVPED("AD",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 50 | ..S ARRAY="^AUPNVPED(""AD"",I,IEN)" S PEDCNT=PEDCNT+1 I PEDCNT#1000=2 D MON^PXQUTL3B
|
---|
| 51 | ..I '$D(^AUPNVPED(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVPED(""AD"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 52 | S I="" F S I=$O(^AUPNVPED("C",I)) Q:I="" D Q:Y="^"
|
---|
| 53 | . S IEN="" F S IEN=$O(^AUPNVPED("C",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 54 | ..S ARRAY="^AUPNVPED(""C"",I,IEN)" S PEDCNT=PEDCNT+1 I PEDCNT#1000=2 D MON^PXQUTL3B
|
---|
| 55 | ..I '$D(^AUPNVPED(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVPED(""C"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 56 | S I="" F S I=$O(^AUPNVPED("AA",I)) Q:I="" D Q:Y="^"
|
---|
| 57 | . S IEN="" F S IEN=$O(^AUPNVPED("AA",I,IEN)) Q:IEN="" D Q:Y="^"
|
---|
| 58 | ..S IENN="" F S IENN=$O(^AUPNVPED("AA",I,IEN,IENN)) Q:IENN="" D Q:Y="^"
|
---|
| 59 | ...S IENNN="" F S IENNN=$O(^AUPNVPED("AA",I,IEN,IENN,IENNN)) Q:IENNN="" D Q:Y="^"
|
---|
| 60 | ....S ARRAY="^AUPNVPED(""AA"",I,IEN,IENN,IENNN)" S PEDCNT=PEDCNT+1 I PEDCNT#1000=2 D MON^PXQUTL3B
|
---|
| 61 | ....I '$D(^AUPNVPED(IENNN)) W !,"Entry "_IENNN," IS NOT THERE! BAD REFERENCE IS ^AUPNVPED(""AA"","_I_",",IEN_","_IENN_","_IENNN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 62 | Q
|
---|
| 63 | ;
|
---|
| 64 | ;
|
---|
| 65 | H W !!,"Checking the V HEALTH FACTOR FILE #9000010.23 ",!
|
---|
| 66 | S HFCNT=0
|
---|
| 67 | I Y="^" Q
|
---|
| 68 | S I="" F S I=$O(^AUPNVHF("B",I)) Q:I="" D Q:Y="^"
|
---|
| 69 | . S IEN="" F S IEN=$O(^AUPNVHF("B",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 70 | ..S ARRAY="^AUPNVHF(""B"",I,IEN)" S HFCNT=HFCNT+1 I HFCNT#1000=2 D MON^PXQUTL3B
|
---|
| 71 | ..I '$D(^AUPNVHF(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVHF(""B"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 72 | S I="" F S I=$O(^AUPNVHF("AD",I)) Q:I="" D Q:Y="^"
|
---|
| 73 | . S IEN="" F S IEN=$O(^AUPNVHF("AD",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 74 | ..S ARRAY="^AUPNVHF(""AD"",I,IEN)" S HFCNT=HFCNT+1 I HFCNT#1000=2 D MON^PXQUTL3B
|
---|
| 75 | ..I '$D(^AUPNVHF(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVHF(""AD"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 76 | S I="" F S I=$O(^AUPNVHF("C",I)) Q:I="" D Q:Y="^"
|
---|
| 77 | . S IEN="" F S IEN=$O(^AUPNVHF("C",I,IEN)) W:IEN#1000=22 "." Q:IEN="" D Q:Y="^"
|
---|
| 78 | ..S ARRAY="^AUPNVHF(""C"",I,IEN)" S HFCNT=HFCNT+1 I HFCNT#1000=2 D MON^PXQUTL3B
|
---|
| 79 | ..I '$D(^AUPNVHF(IEN)) W !,"Entry "_IEN," IS NOT THERE! BAD REFERENCE IS ^AUPNVHF(""C"","_I_",",IEN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 80 | S I="" F S I=$O(^AUPNVHF("AA",I)) Q:I="" D Q:Y="^"
|
---|
| 81 | . S IEN="" F S IEN=$O(^AUPNVHF("AA",I,IEN)) Q:IEN="" D Q:Y="^"
|
---|
| 82 | ..S IENN="" F S IENN=$O(^AUPNVHF("AA",I,IEN,IENN)) Q:IENN="" D Q:Y="^"
|
---|
| 83 | ...S IENNN="" F S IENNN=$O(^AUPNVHF("AA",I,IEN,IENN,IENNN)) W:IENNN#1000=22 "." Q:IENNN="" D Q:Y="^"
|
---|
| 84 | ....S ARRAY="^AUPNVHF(""AA"",I,IEN,IENN,IENNN)" S HFCNT=HFCNT+1 I HFCNT#1000=2 D MON^PXQUTL3B
|
---|
| 85 | ....I '$D(^AUPNVHF(IENNN)) W !,"Entry "_IENNN," IS NOT THERE! BAD REFERENCE IS ^AUPNVHF(""AA"","_I_",",IEN_","_IENN_","_IENNN_")" D @$S(AUTO="F":"KILL",AUTO'="F":"TT",1:"")
|
---|
| 86 | Q
|
---|
| 87 | ;
|
---|
| 88 | ;
|
---|
| 89 | TT ;--QUERY FOR CORRECT ENTRY
|
---|
| 90 | S DIR("A")="Should I fix this one by removing the reference ?? "
|
---|
| 91 | S DIR("B")="NO"
|
---|
| 92 | S DIR(0)="YAO" D ^DIR
|
---|
| 93 | I Y=1 D
|
---|
| 94 | .K @ARRAY
|
---|
| 95 | I Y="^" Q
|
---|
| 96 | Q
|
---|
| 97 | KILL ;--AUTOMATIC
|
---|
| 98 | ;W !,"KILL "_ARRAY
|
---|
| 99 | K @ARRAY
|
---|
| 100 | Q
|
---|