source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDBIM1.m@ 691

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

initial load of WorldVistAEHR

File size: 4.1 KB
RevLine 
[613]1VAQDBIM1 ;ALB/JRP - MEANS TEST EXTRACTION (SCREEN 1);28-FEB-93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3 ; **********
4 ; * PARTS OF THIS ROUTINE HAVE BEEN COPIED AND ALTERED FROM THE
5 ; * DGMTSC* ROUTINES. FOR MODULES THIS WAS DONE FOR, A REFERENCE
6 ; * TO THE DGMTSC* ROUTINE WILL BE INCLUDE.
7 ; **********
8 ;
9XTRCT1(DFN,ARRAY,OFFSET) ;EXTRACT SCREEN 1
10 ;MARITAL STATUS/DEPENDENT INFORMATION
11 ;This module is based on DIS^DGMTSC1
12 ;
13 ;INPUT : See EXTRACT^VAQDBIM for explanation of parameters. Input
14 ; also includes all DG* variables required to build screen.
15 ;OUTPUT : n - Number of lines in display
16 ; -1^Error_text - Error
17 ;
18 ;CHECK INPUT
19 Q:('$D(DFN)) "-1^Pointer to patient file not passed"
20 Q:('$D(ARRAY)) "-1^Reference to output array not passed"
21 Q:('$D(OFFSET)) "-1^Starting offset not passed"
22 ;DECLARE VARIABLES
23 N DGDEP,DGINR,DGREL,DGVIR0,X,TMP,COUNT,LINES
24 ;EXTRACT HEADER
25 S LINES=OFFSET
26 S TMP=$$HEADER^VAQDBIM0(1,ARRAY,OFFSET)
27 Q:(TMP<0) TMP
28 S OFFSET=LINES+TMP
29 ;INITIALIZE MEANS TEST VARIABLES
30 D ALL^DGMTU21(DFN,"CS",DGMTDT,"PR")
31 S DGVIR0=$G(^DGMT(408.22,DGVIRI,0))
32 ;EXTRACT MARITAL STATUS INFORMATION
33 S @ARRAY@("DISPLAY",OFFSET,0)=$$INSERT^VAQUTL1("Was marital status married or separated on Dec 31st last year: ","",5)_$$YN^DGMTSCU1($P(DGVIR0,"^",5))
34 S OFFSET=OFFSET+1
35 S @ARRAY@("DISPLAY",OFFSET,0)=$$INSERT^VAQUTL1("Did you live with your spouse last year: ","",27)_$S($P(DGVIR0,"^",5)=0:"N/A",1:$$YN^DGMTSCU1($P(DGVIR0,"^",6)))
36 S OFFSET=OFFSET+1
37 S @ARRAY@("DISPLAY",OFFSET,0)=$$INSERT^VAQUTL1("Amount contributed to spouse: ","",38)_$S($P(DGVIR0,"^",5)=0!($P(DGVIR0,"^",6)):"N/A",1:$$AMT^DGMTSCU1($P(DGVIR0,"^",7)))
38 S OFFSET=OFFSET+1
39 I $P(DGVIR0,"^",5),$D(DGREL("S")) D
40 .;SPOUSE'S INFORMATION
41 .S @ARRAY@("DISPLAY",OFFSET,0)=""
42 .S OFFSET=OFFSET+1
43 .S TMP=$$INSERT^VAQUTL1("Spouse's Name: ","",5)_$E($$NAME^DGMTU1(+DGREL("S")),1,15)
44 .S X="SSN: "_$$SSN^DGMTU1(+DGREL("S"))
45 .S TMP=$$INSERT^VAQUTL1(X,TMP,37)
46 .S X="DOB: "_$$DOB^DGMTU1(+DGREL("S"))
47 .S TMP=$$INSERT^VAQUTL1(X,TMP,57)
48 .S @ARRAY@("DISPLAY",OFFSET,0)=TMP
49 .S OFFSET=OFFSET+1
50 S @ARRAY@("DISPLAY",OFFSET,0)=""
51 S OFFSET=OFFSET+1
52 ;EXTRACT DEPENDENT CHILDREN INFORMATION
53 S TMP=$$INSERT^VAQUTL1("Dependent Children: ","",5)
54 S @ARRAY@("DISPLAY",OFFSET,0)=TMP_$$YN^DGMTSCU1($P(DGVIR0,"^",8))
55 S OFFSET=OFFSET+1
56 I $P(DGVIR0,"^",8) D
57 .;EXTRACT INFORMATION FOR ALL DEPENDENT CHILDREN
58 .S @ARRAY@("DISPLAY",OFFSET,0)=""
59 .S OFFSET=OFFSET+1
60 .;COLUMN HEADINGS
61 .S TMP=$$INSERT^VAQUTL1("Child's","",9)
62 .S TMP=$$INSERT^VAQUTL1("Incapable of",TMP,22)
63 .S TMP=$$INSERT^VAQUTL1("Child lived",TMP,35)
64 .S TMP=$$INSERT^VAQUTL1("Child",TMP,47)
65 .S TMP=$$INSERT^VAQUTL1("Child's",TMP,58)
66 .S TMP=$$INSERT^VAQUTL1("Income",TMP,69)
67 .S @ARRAY@("DISPLAY",OFFSET,0)=TMP
68 .S OFFSET=OFFSET+1
69 .S TMP=$$INSERT^VAQUTL1("First Name","",9)
70 .S TMP=$$INSERT^VAQUTL1("Self-support",TMP,22)
71 .S TMP=$$INSERT^VAQUTL1("with you",TMP,35)
72 .S TMP=$$INSERT^VAQUTL1("Support",TMP,47)
73 .S TMP=$$INSERT^VAQUTL1("Income",TMP,58)
74 .S TMP=$$INSERT^VAQUTL1("Available",TMP,69)
75 .S @ARRAY@("DISPLAY",OFFSET,0)=TMP
76 .S OFFSET=OFFSET+1
77 .S TMP=""
78 .F COUNT=9,22,35,47,58,69 S TMP=$$INSERT^VAQUTL1("----------",TMP,COUNT)
79 .S @ARRAY@("DISPLAY",OFFSET,0)=TMP
80 .S OFFSET=OFFSET+1
81 .;EXTRACT INFORMATION
82 .S COUNT=0
83 .F S COUNT=$O(DGREL("C",COUNT)) Q:'COUNT D CHILD
84 .Q
85 Q (OFFSET-LINES)
86 ;
87CHILD ;EXTRACT DATA COLLECTED FOR A DEPENDENT CHILD
88 ;This module is based on CHILD^DGMTSC11
89 ;DECLARE VARIABLES
90 N DGIR0,TMP
91 ;INITIALIZE MEANS TEST VARIABLE
92 S DGIR0=$G(^DGMT(408.22,+$G(DGINR("C",COUNT)),0))
93 ;EXTRACT INFORMATION
94 S TMP=$$INSERT^VAQUTL1((COUNT_"."),"",5)
95 S TMP=$$INSERT^VAQUTL1($E($P($$NAME^DGMTU1(+DGREL("C",COUNT)),",",2),1,12),TMP,9)
96 S TMP=$$INSERT^VAQUTL1($$YN^DGMTSCU1($P(DGIR0,"^",9)),TMP,22)
97 S TMP=$$INSERT^VAQUTL1($$YN^DGMTSCU1($P(DGIR0,"^",6)),TMP,35)
98 S TMP=$$INSERT^VAQUTL1($S($P(DGIR0,"^",6):"N/A",1:$$YN^DGMTSCU1($P(DGIR0,"^",10))),TMP,47)
99 S TMP=$$INSERT^VAQUTL1($$YN^DGMTSCU1($P(DGIR0,"^",11)),TMP,58)
100 S TMP=$$INSERT^VAQUTL1($S($P(DGIR0,"^",11)=0:"N/A",1:$$YN^DGMTSCU1($P(DGIR0,"^",12))),TMP,69)
101 S @ARRAY@("DISPLAY",OFFSET,0)=TMP
102 S OFFSET=OFFSET+1
103 Q
Note: See TracBrowser for help on using the repository browser.