Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IVM2164P

IVM2164P.m

Go to the documentation of this file.
IVM2164P ;ALB/KUM - Patch IVM*2*164 Post-Install Routine ;01/23/18 8:36AM
 ;;2.0;INCOME VERIFICATION MATCH;**164**;21-OCT-94;Build 98
 ;Per VA Directive 6402, this routine should not be modified.
 ;
 ;This routine will add new entries to the IVM DEMOGRAPHIC UPLOAD
 ;FIELDS file #301.92
 Q
 ;
EP ;Entry point - Driver
 N IVMABRT,IVMFIL,I,IVMELE,EXIST,IVMDATA,DATA,SUB,J,VALUE,FILEFLG,DIERR,IVMERR,IEN,NAME,ERR,IVMCT
 ;
 S (IVMABRT,FILEFLG)=0,IVMFIL=301.92,IVMCT=0
 D MES^XPDUTL("Adding entries into the IVM DEMOGRAPHIC UPLOAD FIELDS (#301.92) file:")
 F I=1:1 S IVMELE=$P($T(TEXT+I),";;",2) Q:IVMELE="QUIT"!(IVMABRT)  D
 . S EXIST=0
 . K IVMDATA S (DATA,SUB)="" F J=1:1:$L(IVMELE,";") S DATA=$P(IVMELE,";",J) D
 . . S SUB=$P(DATA,"~",1),VALUE=$P(DATA,"~",2),IVMDATA(SUB)=VALUE
 . . I SUB=.01 S EXIST=$$FIND1^DIC(IVMFIL,,,IVMDATA(.01))
 . I EXIST D
 . . S NAME=IVMDATA(.01)
 . . S IEN=EXIST_","
 . . S FDA(301.92,IEN,.01)="@"
 . . D UPDATE^DIE("E","FDA","","ERR")
 . . I $D(ERR("DIERR")) D BMES^XPDUTL("    Error in deleting field "_NAME) Q
 . . D BMES^XPDUTL(NAME_" deleted to recreate with correct field values  ")
 . . S EXIST=0
 . . Q
 . I 'EXIST D
 . . S FILEFLG=$$ADD(IVMFIL,.IVMDATA)
 . . I FILEFLG D MES^XPDUTL("Added - "_$G(IVMDATA(.01)))
 . . I 'FILEFLG D
 . . . S IVMABRT=1
 . . . D BMES^XPDUTL("Install process could not add an entry in file for "_$G(IVMDATA(.01)))
 . . . D BMES^XPDUTL("                        <<<< INSTALLATION ABORTED >>>>")
 I 'IVMABRT D BMES^XPDUTL("<<<< Post Install Successful >>>>")
 Q
 ;
ADD(IVMFIL,DATA) ;
 ;Description: Creates a new record and files the data.
 ; Input:
 ;   IVMFIL - File or sub-file number
 ;   DATA - Data array to file, pass by reference
 ;          Format: DATA(<field #>)=<value>
 ;
 ; Output:
 ;   Function Value - If no error then it returns the ien of the created record, else returns NULL.
 ;
 N FDA,FIELD,IEN,IENA,IENS,IVMDA,IVMERRS
 ;
 ;IENS - Internal Entry Number String defined by FM
 ;IENA - the Internal Entry Number Array defined by FM
 ;FDA - the FDA array defined by FM
 ;IEN - the ien of the new record
 ;
 S IVMDA="+1"
 S IENS=$$IENS^DILF(.IVMDA)
 S FIELD=0
 F  S FIELD=$O(DATA(FIELD)) Q:'FIELD  D
 .S FDA(IVMFIL,IENS,FIELD)=$G(DATA(FIELD))
 I $G(IEN) S IENA(1)=IEN
 D UPDATE^DIE("","FDA","IENA","IVMERRS(1)")
 I +$G(DIERR) D
 .S IVMERR=$G(IVMERRS(1,"DIERR",1,"TEXT",1))
 .S IEN=""
 E  D
 .S IEN=IENA(1)
 .S IVMERR=""
 D CLEAN^DILF
 Q IEN
 ;
TEXT ;;FIELD#~VALUE;FIELD#~VALUE;FIELD#~VALUE.....
 ;;.01~STREET ADDR CASS;.02~ZAV03;.03~1;.04~2;.05~.1118;.06~1;.07~1;.08~1;10~S DR=.1118 D LOOK^IVMPREC9;20~S DR=.1118 D LOOK^IVMPREC9
 ;;.01~TEMPORARY ADDR CASS;.02~ZAV04;.03~1;.04~2;.05~.12115;.06~1;.07~1;.08~0;10~S DR=.12115 D LOOK^IVMPREC9;20~S DR=.12115 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR CASS;.02~ZAV02;.03~1;.04~2;.05~.14117;.06~1;.07~1;.08~0;10~S DR=.14117 D LOOK^IVMPREC9;20~S DR=.14117 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDR CASS;.02~ZAV01;.03~1;.04~2;.05~.1159;.06~1;.07~1;.08~0;10~S DR=.1159 D LOOK^IVMPREC9;20~S DR=.1159 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDRESS CATEGORY;.02~PID117C;.03~1;.04~2;.05~.141;.06~0;.07~0;.08~0;10~S DA(1)=DFN,DA=IEN,DIC="^DPT(DA(1),.141,IEN," D ^DIC;20~S DA(1)=DFN,DA=IEN,DIC="^DPT(DA(1),.141,IEN," D ^DIC
 ;;.01~CONFIDENTIAL STREET [LINE 1];.02~PID111C;.03~1;.04~2;.05~.1411;.06~1;.07~1;.08~0;10~S DR=.1411 D LOOK^IVMPREC9;20~S DR=.1411 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL STREET [LINE 2];.02~PID112C;.03~1;.04~2;.05~.1412;.06~1;.07~1;.08~0;10~S DR=.1412 D LOOK^IVMPREC9;20~S DR=.1412 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL STREET [LINE 3];.02~PID118C;.03~1;.04~2;.05~.1413;.06~1;.07~1;.08~0;10~S DR=.1413 D LOOK^IVMPREC9;20~S DR=.1413 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDRESS CITY;.02~PID113C;.03~1;.04~2;.05~.1414;.06~1;.07~1;.08~0;10~S DR=.1414 D LOOK^IVMPREC9;20~S DR=.1414 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDRESS STATE;.02~PID114C;.03~1;.04~2;.05~.1415;.06~1;.07~1;.08~0;10~S DR=.1415 D LOOK^IVMPREC9;20~S DR=.1415 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDRESS ZIP CODE;.02~PID115C;.03~1;.04~2;.05~.1416;.06~1;.07~1;.08~0;10~S DR=.1416 D LOOK^IVMPREC9;20~S DR=.1416 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR COUNTRY;.02~PID116C;.03~1;.04~2;.05~.14116;.06~1;.07~1;.08~0;10~S DR=.14116 D LOOK^IVMPREC9;20~S DR=.14116 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR PROVINCE;.02~PID114CF;.03~1;.04~2;.05~.14114;.06~1;.07~1;.08~0;10~S DR=.14114 D LOOK^IVMPREC9;20~S DR=.14114 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR POSTAL CODE;.02~PID115CF;.03~1;.04~2;.05~.14115;.06~1;.07~1;.08~0;10~S DR=.14115 D LOOK^IVMPREC9;20~S DR=.14115 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDRESS COUNTY;.02~PID119C;.03~1;.04~2;.05~.14111;.06~1;.07~1;.08~0;10~S DR=.14111 D LOOK^IVMPREC9;20~S DR=.14111 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL PHONE NUMBER;.02~PID13CA;.03~1;.04~2;.05~.1315;.06~1;.07~1;.08~0;10~S DR=.1315 D LOOK^IVMPREC9;20~S DR=.1315 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL START DATE;.02~PID1112C;.03~1;.04~2;.05~.1417;.06~1;.07~1;.08~0;10~S DR=.1417 D LOOK^IVMPREC9;20~S DR=.1417 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL END DATE;.02~PID1113C;.03~1;.04~2;.05~.1418;.06~1;.07~1;.08~0;10~S DR=.1418 D LOOK^IVMPREC9;20~S DR=.1418 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR CHANGE DT/TM;.02~RF171CA;.03~1;.04~2;.05~.14112;.06~1;.07~1;.08~0;10~S DR=.14112 D LOOK^IVMPREC9;20~S DR=.14112 D LOOK^IVMPREC9
 ;;.01~CONFIDENTIAL ADDR CHANGE SITE;.02~RF161CA;.03~1;.04~2;.05~.14113;.06~1;.07~1;.08~0;10~S DR=.14113 D LOOK^IVMPREC9;20~S DR=.14113 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDRESS [LINE 1];.02~PID111R;.03~1;.04~2;.05~.1151;.08~0;10~S DR=.1151 D LOOK^IVMPREC9;20~S DR=.1151 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDRESS [LINE 2];.02~PID112R;.03~1;.04~2;.05~.1152;.08~0;10~S DR=.1152 D LOOK^IVMPREC9;20~S DR=.1152 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDRESS [LINE 3];.02~PID118R;.03~1;.04~2;.05~.1153;.08~0;10~S DR=.1153 D LOOK^IVMPREC9;20~S DR=.1153 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL CITY;.02~PID113R;.03~1;.04~2;.05~.1154;.08~0;10~S DR=.1154 D LOOK^IVMPREC9;20~S DR=.1154 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL STATE;.02~PID114R;.03~1;.04~2;.05~.1155;.06~1;.08~0;10~S DR=.1155 D LOOK^IVMPREC9;20~S DR=.1155 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ZIP+4;.02~PID115R;.03~1;.04~2;.05~.1156;.06~1;.08~0;10~S DR=.1156 D LOOK^IVMPREC9;20~S DR=.1156 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL COUNTRY;.02~PID116R;.03~1;.04~2;.05~.11573;.08~0;10~S DR=.11573 D LOOK^IVMPREC9;20~S DR=.11573 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL PROVINCE;.02~PID114RF;.03~1;.04~2;.05~.11571;.08~0;10~S DR=.11571 D LOOK^IVMPREC9;20~S DR=.11571 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL POSTAL CODE;.02~PID115RF;.03~1;.04~2;.05~.11572;.08~0;10~S DR=.11572 D LOOK^IVMPREC9;20~S DR=.11572 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL COUNTY;.02~PID119R;.03~1;.04~2;.05~.1157;.08~0;10~S DR=.1157 D LOOK^IVMPREC9;20~S DR=.1157 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDR CHANGE DT/TM;.02~RF171RA;.03~1;.04~2;.05~.1158;.06~1;.07~1;.08~0;10~S DR=.1158 D LOOK^IVMPREC9;20~S DR=.1158 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDR CHANGE SITE;.02~RF161RA;.03~1;.04~2;.05~.11581;.06~1;.07~1;.08~0;10~S DR=.11581 D LOOK^IVMPREC9;20~S DR=.11581 D LOOK^IVMPREC9
 ;;.01~RESIDENTIAL ADDR CHANGE SOURCE;.02~RF162RA;.03~1;.04~2;.05~.11582;.06~1;.07~1;.08~0;10~S DR=.11582 D LOOK^IVMPREC9;20~S DR=.11582 D LOOK^IVMPREC9
 ;;QUIT