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/XIPSYNC.m@ 1306

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1XIPSYNC ;OIFOO/SO- SYNC UP FILE 5'S COUNTY MULTIPLE WITH 5.13;6:56 AM 16 Nov 2005
2 ;;8.0;KERNEL;**328,378**;Jul 10, 1995;Build 59
3 Q
4EP1 ;MAIN ENTRY POINT
5 N XIPQ S XIPQ=0 ;ALLOW DIALOG TO DISPLAY OR PRINT
6 ;
7 N XUMF S XUMF=1 ;ALLOW EDITING ;8*378
8 ;
9 D S1,S2
10 Q
11 ;
12DEQUE ;DEQUEUING ENTRY POINT
13 N XIPQ S XIPQ=1 ;KEEP DIALOG FROM DISPLAYING OR PRINTING
14 ;
15 N XUMF S XUMF=1 ;ALLOW EDITING ;8*378
16 ;
17 D S1,S2
18 Q
19 ;
20S1 ;SET INACTIVE DATE FOR ALL COUNTIES TO DT
21 N ST
22 S ST=0 ;ST=STATE IEN
23 I 'XIPQ D MES^XPDUTL("Begin updating COUNTY multiple...")
24 F S ST=$O(^DIC(5,ST)) Q:'ST D
25 . I +$P(^DIC(5,ST,0),U,3)>56,+$P(^(0),U,3)'=72 Q ;NOT US STATE OR PR
26 . N CO S CO=0 ;CO=COUNTY IEN
27 . F S CO=$O(^DIC(5,ST,1,CO)) Q:'CO D
28 .. I $P(^DIC(5,ST,1,CO,0),U,5)]"" Q ;DON'T CHANGE DATE
29 .. N FDA,DIERR,EM
30 .. S FDA(5.01,CO_","_ST_",",5)=DT
31 .. D FILE^DIE("","FDA","EM")
32 .. Q
33 Q
34 ;
35S2 ;EDIT COUNTY MULTIPLE USING FILE 5.13
36 N IEN,X,FST,FCO
37 ;FST=2 DIGIT STATE FIPS CODE, FCO=3 DIGIT COUNTY FIPS CODE
38 S IEN=0 ;5.13'S IEN
39 F S IEN=$O(^XIP(5.13,IEN)) Q:'IEN S X=^XIP(5.13,IEN,0),FST=$E(X,1,2),FCO=$E(X,3,5) D
40 . N ST,CO
41 . S ST=0,CO=0
42 . S ST=$O(^DIC(5,"C",FST,ST))
43 . I 'ST,'XIPQ D MES^XPDUTL("Can not find STATE CODE: "_FST_" in STATE file.") Q
44 . S CO=$O(^DIC(5,ST,1,"C",FCO,CO))
45 . I 'CO D Q ;ADD COUNTY
46 .. N DIERR,EM,FDA
47 .. I 'XIPQ D MES^XPDUTL("Adding County: "_$P(X,U,2)_"("_FCO_")"_" to State: "_$$GET1^DIQ(5,ST_",",.01))
48 .. S FDA(5.01,"?+1,"_ST_",",.01)=$P(X,U,2)
49 .. S FDA(5.01,"?+1,"_ST_",",2)=FCO
50 .. D UPDATE^DIE("","FDA","","EM")
51 .. Q
52 . I CO D Q ;REACTIVATE COUNTY
53 .. N DIERR,EM,FDA
54 .. S FDA(5.01,CO_","_ST_",",5)=$S($P(X,U,4)]"":$P(X,U,4),1:"")
55 .. D ;SPELL CHECK 5.13 v STATE FILE'S COUNTY
56 ... N DIERR,X1
57 ... S X1=$$GET1^DIQ(5.01,CO_",",.01)
58 ... I X1'=$P(X,U,2) S FDA(5.01,CO_","_ST_",",.01)=$P(X,U,2)
59 .. D FILE^DIE("","FDA","EM")
60 .. Q
61 . Q
62 I 'XIPQ D MES^XPDUTL("Finished updating COUNTY multiple.")
63 Q
Note: See TracBrowser for help on using the repository browser.