source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGENCDRP.m@ 636

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1DGENCDRP ;ISA/Zoltan - Catastrophic Disability Eligibily Code Report;6/24/99
2 ;;5.3;Registration;**232**;Aug 13,1993
3REPORT ; Print a report of all patients having the CATASTROPHICALLY DISABLED
4 ; Eligibility code.
5 W:$X !!
6 W "This routine will print a report of all patients having the",!
7 W "inactivated CATASTROPHIC DISABILITY eligibility code.",!
8 N PFX,L,DIC,FLDS,BY,DIOBEG,DIOEND
9 D DT^DICRW ; Set up FM required variables.
10 S PFX="^TMP($J,""DGENCDRP""," ; Partial global reference.
11 S DIOBEG="D MAKELIST^DGENCDRP(""^TMP($J,""""DGENCDRP"""")"",$J'="_$J_")"
12 S DIOEND="K ^TMP($J,""DGENCDRP"")"
13 S L=0 ; No SORT prompt.
14 S DIC="^DPT(" ; Global prefix.
15 S FLDS="[DGENCD ELIG CODE]" ; Fields to print.
16 S BY(0)=PFX ; Sorted list.
17 S L(0)=2 ; Number of subscripts in sorted list.
18 D EN1^DIP
19 Q
20MAKELIST(ARR,SILENT) ;
21 ; Returns a list of patients having the CATASTROPHICALLY DISABLED
22 ; Eligibility code as either their PRIMARY or SECONDARY Eligibility.
23 K @ARR
24 S SILENT=''$G(SILENT,0) ; Suppress screen output.
25 N ELIG,DFN,X
26 I 'SILENT D
27 . W "Creating list of patients having the CATASTROPHICALLY DISABLED",!
28 . W "Eligibility Code..."
29 S ELIG=""
30 F S ELIG=$O(^DIC(8,"B","CATASTROPHICALLY DISABLED",ELIG)) Q:ELIG="" D
31 . ; "AEL" index ^DPT("AEL",DFN,elig)=""
32 . ; Note this inex contains both primary eligibility (#.361) and
33 . ; Patient eligibilities (#361).
34 . S DFN=""
35 . F X=1:1 S DFN=$O(^DPT("AEL",DFN)) Q:DFN="" W:X#10000'!SILENT "." I $D(^DPT("AEL",DFN,ELIG)) D ADD(ARR,DFN)
36 Q
37ADD(ARR,DFN) ; Add Patient to array.
38 N NAME
39 S NAME=$P(^DPT(DFN,0),"^",1)
40 S @ARR@(NAME,DFN)=""
41 Q
Note: See TracBrowser for help on using the repository browser.