[613] | 1 | EASEZT2 ;ALB/jap - Data Transformation Logic for 1010EZ Processing ;10/12/00 13:08
|
---|
| 2 | ;;1.0;ENROLLMENT APPLICATION SYSTEM;**51,57,66**;Mar 15, 2001
|
---|
| 3 | ;
|
---|
| 4 | WORKPH(EASAPP,TYPE) ;
|
---|
| 5 | ;input EASAPP = application ien in file #712
|
---|
| 6 | ; TYPE = "APPLICANT", "SPOUSE", "NEXT-OF-KIN", "E-CONTACT",
|
---|
| 7 | ;output PHONE = formatted work phone or null;
|
---|
| 8 | ; example: (432)987-1234 X123
|
---|
| 9 | ;
|
---|
| 10 | N PHONE,MULTIPLE,AC,NUM,EXT,KEY,T
|
---|
| 11 | S PHONE="",MULTIPLE=1
|
---|
| 12 | S KEY=+$$KEY711^EASEZU1(TYPE_" WORK PHONE AREA CODE") I KEY D
|
---|
| 13 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 14 | S KEY=+$$KEY711^EASEZU1(TYPE_" WORK PHONE NUMBER") I KEY D
|
---|
| 15 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 16 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 17 | S KEY=+$$KEY711^EASEZU1(TYPE_" WORK PHONE EXTENSION") I KEY D
|
---|
| 18 | .S EXT=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 19 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 20 | I AC'="" S AC="("_AC_")"
|
---|
| 21 | I NUM="-" S NUM=""
|
---|
| 22 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 23 | I EXT'="" S EXT=" X"_EXT
|
---|
| 24 | I NUM="" Q PHONE
|
---|
| 25 | S PHONE=AC_NUM_EXT
|
---|
| 26 | Q PHONE
|
---|
| 27 | ;
|
---|
| 28 | HOMEPH(EASAPP,TYPE) ;
|
---|
| 29 | ;input EASAPP = application ien in file #712
|
---|
| 30 | ; TYPE = "APPLICANT", "SPOUSE", "NEXT-OF-KIN", "E-CONTACT"
|
---|
| 31 | ;output PHONE = formatted home phone;
|
---|
| 32 | ; example: (432)987-1234
|
---|
| 33 | ;
|
---|
| 34 | N PHONE,MULTIPLE,AC,NUM,KEY,T
|
---|
| 35 | S PHONE="",MULTIPLE=1
|
---|
| 36 | S KEY=+$$KEY711^EASEZU1(TYPE_" HOME PHONE AREA CODE") I KEY D
|
---|
| 37 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 38 | S KEY=+$$KEY711^EASEZU1(TYPE_" HOME PHONE NUMBER") I KEY D
|
---|
| 39 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 40 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 41 | I AC'="" S AC="("_AC_")"
|
---|
| 42 | I NUM="-" S NUM=""
|
---|
| 43 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 44 | I NUM="" Q PHONE
|
---|
| 45 | S PHONE=AC_NUM
|
---|
| 46 | Q PHONE
|
---|
| 47 | ;
|
---|
| 48 | INSPH(EASAPP,TYPE,MULTIPLE) ;
|
---|
| 49 | ;input EASAPP = application ien in file #712
|
---|
| 50 | ; TYPE = "APPLICANT", "OTHER(N)"
|
---|
| 51 | ; MULTIPLE = EASMULT Value def=1
|
---|
| 52 | ;output PHONE = formatted home phone;
|
---|
| 53 | ; example: (432)987-1234
|
---|
| 54 | ;
|
---|
| 55 | N PHONE,AC,NUM,KEY,T
|
---|
| 56 | S PHONE="",MULTIPLE=+$G(MULTIPLE) I MULTIPLE<2 S MULTIPLE=1
|
---|
| 57 | S KEY=+$$KEY711^EASEZU1(TYPE_" INSURANCE PHONE AREA CODE") I KEY D
|
---|
| 58 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 59 | S KEY=+$$KEY711^EASEZU1(TYPE_" INSURANCE PHONE NUMBER") I KEY D
|
---|
| 60 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 61 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 62 | I AC'="" S AC="("_AC_")"
|
---|
| 63 | I NUM="-" S NUM=""
|
---|
| 64 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 65 | I NUM="" Q PHONE
|
---|
| 66 | S PHONE=AC_NUM
|
---|
| 67 | Q PHONE
|
---|
| 68 | ;
|
---|
| 69 | EMPLPH(EASAPP,TYPE) ;
|
---|
| 70 | ;input EASAPP = application ien in file #712
|
---|
| 71 | ; TYPE = "APPLICANT", "SPOUSE"
|
---|
| 72 | ;output PHONE = formatted employer phone or null;
|
---|
| 73 | ; example: (432)987-1234 X123
|
---|
| 74 | ;
|
---|
| 75 | N PHONE,MULTIPLE,AC,NUM,EXT,KET,T
|
---|
| 76 | S PHONE="",MULTIPLE=1
|
---|
| 77 | S KEY=+$$KEY711^EASEZU1(TYPE_" EMPLOYER PHONE AREA CODE") I KEY D
|
---|
| 78 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 79 | S KEY=+$$KEY711^EASEZU1(TYPE_" EMPLOYER PHONE NUMBER") I KEY D
|
---|
| 80 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 81 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 82 | S KEY=+$$KEY711^EASEZU1(TYPE_" EMPLOYER PHONE EXTENSION") I KEY D
|
---|
| 83 | .S EXT=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 84 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 85 | I AC'="" S AC="("_AC_")"
|
---|
| 86 | I NUM="-" S NUM=""
|
---|
| 87 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 88 | I EXT'="" S EXT=" X"_EXT
|
---|
| 89 | I NUM="" Q PHONE
|
---|
| 90 | S PHONE=AC_NUM_EXT
|
---|
| 91 | Q PHONE
|
---|
| 92 | ;
|
---|
| 93 | CELLPH(EASAPP,TYPE) ;
|
---|
| 94 | ;input EASAPP = application ien in file #712
|
---|
| 95 | ; TYPE = "APPLICANT"
|
---|
| 96 | ;output PHONE = formatted cell phone or null;
|
---|
| 97 | ; example: (432)987-1234
|
---|
| 98 | ;
|
---|
| 99 | N PHONE,MULTIPLE,AC,NUM,EXT,KEY,T
|
---|
| 100 | S PHONE="",MULTIPLE=1
|
---|
| 101 | S KEY=+$$KEY711^EASEZU1(TYPE_" CELLULAR PHONE AREA CODE") I KEY D
|
---|
| 102 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 103 | S KEY=+$$KEY711^EASEZU1(TYPE_" CELLULAR PHONE NUMBER") I KEY D
|
---|
| 104 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 105 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 106 | I AC'="" S AC="("_AC_")"
|
---|
| 107 | I NUM="-" S NUM=""
|
---|
| 108 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 109 | I NUM="" Q PHONE
|
---|
| 110 | S PHONE=AC_NUM
|
---|
| 111 | Q PHONE
|
---|
| 112 | ;
|
---|
| 113 | PAGERPH(EASAPP,TYPE) ;
|
---|
| 114 | ;input EASAPP = application ien in file #712
|
---|
| 115 | ; TYPE = "APPLICANT"
|
---|
| 116 | ;output PHONE = formatted pager phone or null;
|
---|
| 117 | ; example: (432)987-1234
|
---|
| 118 | ;
|
---|
| 119 | N PHONE,MULTIPLE,AC,NUM,EXT,KEY,T
|
---|
| 120 | S PHONE="",MULTIPLE=1
|
---|
| 121 | S KEY=+$$KEY711^EASEZU1(TYPE_" PAGER PHONE AREA CODE") I KEY D
|
---|
| 122 | .S AC=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 123 | S KEY=+$$KEY711^EASEZU1(TYPE_" PAGER PHONE NUMBER") I KEY D
|
---|
| 124 | .S NUM=$P($$DATA712^EASEZU1(EASAPP,KEY,MULTIPLE),U,1)
|
---|
| 125 | .F T=1,2 S ^TMP("EZDATA",$J,KEY,MULTIPLE,T)=""
|
---|
| 126 | I AC'="" S AC="("_AC_")"
|
---|
| 127 | I NUM="-" S NUM=""
|
---|
| 128 | I NUM'="" S:NUM'["-" NUM=$E(NUM,1,3)_"-"_$E(NUM,4,7)
|
---|
| 129 | I NUM="" Q PHONE
|
---|
| 130 | S PHONE=AC_NUM
|
---|
| 131 | Q PHONE
|
---|
| 132 | ;
|
---|
| 133 | ZIP(XDATA) ;
|
---|
| 134 | N X
|
---|
| 135 | I XDATA="-" S XDATA=""
|
---|
| 136 | I XDATA["-",($L(XDATA)'=10) Q $E(XDATA,1,5)
|
---|
| 137 | I $L(XDATA)<5 S XDATA=""
|
---|
| 138 | Q XDATA
|
---|
| 139 | ;
|
---|
| 140 | EMPLOY(XDATA) ;
|
---|
| 141 | N X
|
---|
| 142 | I XDATA="" Q "UNKNOWN"
|
---|
| 143 | I XDATA="EMPLOYED" Q "EMPLOYED FULL TIME"
|
---|
| 144 | Q XDATA
|
---|
| 145 | ;
|
---|
| 146 | MARR(XDATA) ;
|
---|
| 147 | N X
|
---|
| 148 | I XDATA="" Q "UNKNOWN"
|
---|
| 149 | I XDATA["WIDOW" S XDATA="WIDOW/WIDOWER"
|
---|
| 150 | S X=$O(^DIC(11,"B",XDATA,0))
|
---|
| 151 | I X="" Q "UNKNOWN"
|
---|
| 152 | Q XDATA
|
---|
| 153 | ;
|
---|
| 154 | RELIGION(XDATA) ;
|
---|
| 155 | N X
|
---|
| 156 | I XDATA="" Q "UNKNOWN/NO PREFERENCE"
|
---|
| 157 | S X=$O(^DIC(13,"B",XDATA,0))
|
---|
| 158 | I X="" Q "UNKNOWN/NO PREFERENCE"
|
---|
| 159 | Q XDATA
|
---|
| 160 | ;
|
---|
| 161 | SVCBRCH(XDATA) ;
|
---|
| 162 | N X
|
---|
| 163 | I XDATA="" Q "OTHER"
|
---|
| 164 | S X=$O(^DIC(23,"B",XDATA,0))
|
---|
| 165 | I X="" Q "OTHER"
|
---|
| 166 | Q XDATA
|
---|
| 167 | ;
|
---|
| 168 | SUMSSI(XDATA,IEN) ; glomb income fields for print
|
---|
| 169 | N NODE,CIVIL,RAIL,MILIT,UNEMP,OTHER,INTER,COMP,OUT
|
---|
| 170 | S NODE=$G(^DGMT(408.21,IEN,0))
|
---|
| 171 | S CIVIL=$P(NODE,U,9)
|
---|
| 172 | S RAIL=$P(NODE,U,10)
|
---|
| 173 | S MILIT=$P(NODE,U,11)
|
---|
| 174 | S UNEMP=$P(NODE,U,12)
|
---|
| 175 | S OTHER=$P(NODE,U,13)
|
---|
| 176 | S INTER=$P(NODE,U,15)
|
---|
| 177 | S COMP=$P(NODE,U,16)
|
---|
| 178 | I (XDATA=""),(CIVIL=""),(RAIL=""),(MILIT=""),(UNEMP=""),(OTHER=""),(INTER=""),(COMP="") Q "" ;EAS*66 - IF ALL NULL, PRINT NULL
|
---|
| 179 | S OUT=XDATA+CIVIL+RAIL+MILIT+UNEMP+OTHER+INTER+COMP
|
---|
| 180 | Q OUT
|
---|
| 181 | ;
|
---|
| 182 | SUMCASH(XDATA,IEN) ; glomb net worth fields for print
|
---|
| 183 | N NODE,STOCKS,OUT
|
---|
| 184 | S NODE=$G(^DGMT(408.21,IEN,2))
|
---|
| 185 | S STOCKS=$P(NODE,U,2)
|
---|
| 186 | I (XDATA=""),(STOCKS="") Q "" ;EAS*66 - IF ALL NULL, PRINT NULL
|
---|
| 187 | S OUT=XDATA+STOCKS
|
---|
| 188 | Q OUT
|
---|
| 189 | ;
|
---|
| 190 | SUMPROP(XDATA,IEN) ; glomb net worth fields for print
|
---|
| 191 | N NODE,DEBT,OUT
|
---|
| 192 | S NODE=$G(^DGMT(408.21,IEN,2))
|
---|
| 193 | S DEBT=$P(NODE,U,5)
|
---|
| 194 | I (XDATA=""),(DEBT="") Q "" ;EAS*66 - IF ALL NULL, PRINT NULL
|
---|
| 195 | S OUT=XDATA-DEBT
|
---|
| 196 | Q OUT
|
---|
| 197 | ;
|
---|