source: IHS-VA_UTILITIES-XB/XBPATC.m@ 641

Last change on this file since 641 was 641, checked in by Sam Habiel, 15 years ago

Initial commit of XB, move away from sf.net.
Includes kids file and documentation.

File size: 2.1 KB
Line 
1XBPATC ; IHS/ADC/GTH - CHECK PATIENT GLOBALS ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; $O thru the PATIENT and 3RD party globals looking for missing entries
5 ;
6 ; Thanks to Robert F. Dolan for the original routine.
7 ;
8ST ;
9 W !,"I WILL $O THRU THE PATIENT GLOBALS LOOKING FOR UNEQUAL DFN"
10 W !,"AS UNEQUAL DFN ARE FOUND THE DFN WILL BE DISPLAYED"
11 W !,"YOU SHOULD USE A SLAVE PRINTER FOR THIS RUN, AS THE SCREEN WILL SCROLL AND YOU WILL LOSE NEEDED INFORMATION",!
12 Q:'$$DIR^XBDIR("E")
13 S (CNT,CNT1,CNT2,CNT3)=0,U="^"
14 W !,"LOOPING THROUGH THE IHS PATIENT GLOBAL",!
15LOOP ;
16 S DFN=0
17 F S DFN=$O(^AUPNPAT(DFN)) Q:DFN?.A W "I" D:'$D(^DPT(DFN)) PRT
18LOOP1 ;
19 W !,"LOOPING THROUGH THE VA PATIENT GLOBAL",!
20 S DFN=0
21 F S DFN=$O(^DPT(DFN)) Q:DFN?.A W "V" D:'$D(^AUPNPAT(DFN)) PRT1
22LOOP2 ;
23 W !,"LOOPING THROUGH THE MEDICARE GLOBAL",!
24 S DFN=0
25 F S DFN=$O(^AUPNMCR(DFN)) Q:DFN?.A W "M" D:'$D(^AUPNPAT(DFN)) PRT2
26LOOP3 ;
27 W !,"LOOPING THROUGH THE MEDICAID GLOBAL",!
28 S (DFN,DA)=0
29 F S DA=$O(^AUPNMCD(DA)) Q:DA?.A D
30 . S DFN=$P(^AUPNMCD(DA,0),U,1)
31 . W "D"
32 . I DFN="" D PRT3 Q
33 . D:'$D(^AUPNPAT(DFN)) PRT2
34 .Q
35LOOP4 ;
36 W !,"LOOPING THROUGH THE RAILROAD GLOBAL",!
37 S DFN=0
38 F S DFN=$O(^AUPNRRE(DFN)) Q:DFN?.A W "R" D:'$D(^AUPNPAT(DFN)) PRT2
39LOOP5 ;
40 W !,"LOOPING THROUGH THE PRIVATE INSURANCE GLOBAL",!
41 S DFN=0
42 F S DFN=$O(^AUPNPRVT(DFN)) Q:DFN?.A W "P" D:'$D(^AUPNPAT(DFN)) PRT2
43EXIT ;
44 W !!,"**E N D O F R U N **"
45 W !,"NUMBER OF DFN NOT IN DPT=",CNT
46 W !,"NUMBER OF DFN NOT IN AUPNPAT=",CNT1
47 W !,"NUMBER OF 3RD PARTY DFN's NOT IN AUPNPAT=",CNT2
48 W !,"NUMBER OF MEDICAID RECORDES WITH BAD DFN=",CNT3
49 KILL CNT,CNT1,CNT2,CNT3,AZHDNUM
50 Q
51 ;
52PRT ;PRINT FOR ENTRIES IN AUPNPAT NOT IN DPT
53 W !!,"ENTRY IN AUPNPAT NOT IN DPT, DFN=",DFN
54 S CNT=CNT+1
55 Q
56 ;
57PRT1 ;PRINT FOR ENTRIES IN DPT NOT IN AUPNPAT
58 W !!,"ENTRY IN DPT NOT IN AUPNPAT, DFN=",DFN
59 S CNT1=CNT1+1
60 Q
61PRT2 ;PRINT FOR ENTRIES IN 3RD PARTY FILES BUT NOT IN AUPNPAT
62 W !!,"ENTRY IN 3RD PARTY FILE NOT IN AUPNPAT, DFN=",DFN
63 S CNT2=CNT2+1
64 Q
65PRT3 ;PRINT FOR ENTRIES IN MEDICAID GLOBAL BUT NOT IN AUPNPAT OR POINTER NOT VALID
66 W !!,"ENTRY IN MEDICAID GLOBAL BUT DFN INVALID, DA=",DA,!
67 S CNT3=CNT3+1
68 Q
69 ;
Note: See TracBrowser for help on using the repository browser.