source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XU8P428.m@ 1226

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1XU8P428 ;SFISC/SO- ADD 'UNKNOWN' TO STATE FILE;8:01 AM 17 Aug 2006
2 ;;8.0;KERNEL;**428**;Jul 10, 1995;Build 4
3 N XUMF S XUMF=1
4 N IEN S IEN=0
5 N ADD S ADD=1 ;1=Add 'UNKNOWN' to State File
6 F S IEN=$O(^DIC(5,IEN)) Q:'IEN I $D(^DIC(5,IEN,0))#2 D
7 . N X S X=^(0) ;See For loop line above
8 . I $P(X,U,1)="UNKNOWN" D SEDIT S ADD=0 Q ;Found State Name UNKNOWN
9 . I $P(X,U,2)="UN" D SEDIT S ADD=0 Q ;Found Abbreviation UN
10 . I $P(X,U,3)=99 D SEDIT S ADD=0 Q ;Found State Code 99
11 . Q
12 I 'ADD D COUNTY Q
13ADD ; Add 'OTHER'
14 N DIERR,FDA,ZERR
15 S FDA(5,"+1,",.01)="UNKNOWN"
16 S FDA(5,"+1,",1)="UN"
17 S FDA(5,"+1,",2)=99
18 S FDA(5,"+1,",2.1)="YES"
19 S FDA(5,"+1,",2.2)="No"
20 D UPDATE^DIE("E","FDA","","ZERR")
21 D COUNTY
22 Q
23 ;
24SEDIT ; Edit found State entry
25 N DIERR,FDA,IENS,ZERR
26 S IENS=IEN_","
27 S FDA(5,IENS,.01)="UNKNOWN"
28 S FDA(5,IENS,1)="UN"
29 S FDA(5,IENS,2)=99
30 S FDA(5,IENS,2.1)="YES"
31 S FDA(5,IENS,2.2)="No"
32 D FILE^DIE("E","FDA","ZERR")
33 Q
34 ;
35COUNTY ;Edit County multiple and add to Country Code file
36 N IEN S IEN=$O(^DIC(5,"B","UNKNOWN",0))
37 N IENC S IENC=0
38 S ADD=1 ;1=Add 'OTHER' to County multiple
39 F S IENC=$O(^DIC(5,IEN,1,IENC)) Q:'IENC I $D(^DIC(5,IEN,1,IENC,0))#2 D
40 . N X S X=^(0) ;See For loop line above
41 . I $P(X,U,1)="OTHER" D CEDIT S ADD=0 Q ;Found County Name OTHER
42 . I $P(X,U,3)=999 D CEDIT S ADD=0 Q ;Found County Code 999
43 . ;Inactivate county
44 . N DIERR,FDA,ZERR
45 . S FDA(5.01,IENC_","_IEN_",",5)=$G(DT)
46 . D FILE^DIE("","FDA","ZERR")
47 . Q
48 I 'ADD D E513 Q
49 N DIERR,FDA,ZERR
50 S FDA(5.01,"+1,"_IEN_",",.01)="OTHER"
51 S FDA(5.01,"+1,"_IEN_",",2)=999
52 D UPDATE^DIE("E","FDA","ZERR")
53 D E513
54 Q
55 ;
56CEDIT ;Edit County multiple
57 N DIERR,FDA,ZERR
58 S FDA(5.01,IENC_","_IEN_",",.01)="OTHER"
59 S FDA(5.01,IENC_","_IEN_",",2)=99
60 D FILE^DIE("E","FDA","ZERR")
61 Q
62 ;
63E513 ; Add OTHER to file 5.13
64 N DIERR,FDA,ZERR
65 S FDA(5.13,"?+1,",.01)=99999
66 S FDA(5.13,"?+1,",1)="OTHER"
67 S FDA(5.13,"?+1,",2)="UNKNOWN"
68 D UPDATE^DIE("E","FDA","ZERR")
69 Q
Note: See TracBrowser for help on using the repository browser.