source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG17204.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1DG17204 ;BHM/RGY,ALS-Edit mapping entries ;FEB 20, 1998
2 ;;5.3;Registration;**172**;Aug 13, 1993
3EDIT(TYPE) ;
4 NEW DA,DIE,DR,L,TO,FR,DIC,FLDS,BY
5 F X=0:0 S X=$O(^XTMP("DGTMP",390.2,X)) Q:'X I $P(^(X,0),"^",2)=TYPE,'$P(^(0),"^",3) Q
6 I 'X W !!,"*** No mapping necessary! ***",! K X Q
7 W !! D MESS($S(TYPE=11:"MARITAL",1:"RELIGION")) W !
8 S L=0,DIC="^XTMP(""DGTMP"",390.2,",(TO,FR)="",(BY,FLDS)="[DG172 "_$S(TYPE=11:"MARITAL",1:"RELIGION")_" MAPPING]"
9 D EN1^DIP
10START ;
11 S DIC("A")="Select Non-Standard "_$S(TYPE=11:"Marital Status: ",1:"Religion: "),DIC="^XTMP(""DGTMP"",390.2,",DIC(0)="QEAM",DIC("S")="I '$P(^(0),U,3),$P(^(0),U,2)="_TYPE D ^DIC Q:Y<0 S DA=+Y
12 S DIE="^XTMP(""DGTMP"",390.2,",DR=$S(TYPE=11:.07,1:.06)
13 D ^DIE
14 K Y
15 W ! G START
16BROAD ;
17 NEW D0,DG172,TASK,XMY,XMDUZ,XMTEXT,XMSUB,N0,COUNT,TYPE
18 S XMDUZ="Religion/Marital Status Conversion",XMSUB="Conversion Finished"
19 S XMY(DUZ)="",XMTEXT="DG172(1,"
20 F TASK=0:0 S TASK=$O(^XTMP("DGTMP",390.1,TASK)) Q:'TASK D
21 .I $P(^XTMP("DGTMP",390.1,TASK,0),"^",9)="" S XMSUB="Conversion *NOT* Finished"
22 .Q
23 I XMSUB["NOT" D Q
24 .S DG172(1,1)="The conversion process appears to have been stopped."
25 .S DG172(1,2)="To finish the conversion process, restart by using"
26 .S DG172(1,3)="the 'Begin Religion/Marital Status Conversion' option"
27 .S DG172(1,4)="on the CIRN Pre-Implementation Menu."
28 .D ^XMD
29 .Q
30 S COUNT=1
31 F TYPE=11,13 D
32 .S DG172(1,COUNT)=$S(TYPE=11:"Marital Status",1:"Religion")_" File Non-Standard Entries:",COUNT=COUNT+1
33 .S DG172(1,COUNT)="=========================================",COUNT=COUNT+1
34 .F D0=0:0 S D0=$O(^XTMP("DGTMP",390.2,D0)) Q:'D0 D
35 ..S N0=$G(^XTMP("DGTMP",390.2,D0,0))
36 ..I $P(N0,"^",2)'=TYPE Q
37 ..I '$P(N0,"^",3) S DG172(1,COUNT)=$$DESC(N0)_" (# Converted: "_(+$P(N0,"^",9))_")"
38 ..S COUNT=COUNT+1
39 ..Q
40 .S DG172(1,COUNT)=" ",COUNT=COUNT+1
41 .Q
42 S DG172(1,COUNT)=" ",COUNT=COUNT+1
43 S DG172(1,COUNT)="All non-standard entries listed above have been removed",COUNT=COUNT+1
44 S DG172(1,COUNT)="from their respective files.",COUNT=COUNT+1
45 D ^XMD
46 Q
47DESC(N0) ;
48 NEW TYPE
49 S TYPE=$P(N0,"^",2)
50 I TYPE=13 Q "Entry: "_$P($G(^DIC(13,+$P(N0,"^",4),0)),"^")_" repointed to: "_$P($G(^DIC(13,+$P(N0,"^",6),0)),"^")
51 I TYPE=11 Q "Entry: "_$P($G(^DIC(11,+$P(N0,"^",5),0)),"^")_" repointed to: "_$P($G(^DIC(11,+$P(N0,"^",7),0)),"^")
52 Q ""
53MESS(M) ;Show message
54 NEW C
55 F C=1:1 Q:$P($T(@M+C),";;",2)="" W !,$P($T(@M+C),";;",2)
56 Q
57MARITAL ;
58 ;;This option will identify non-standard MARITAL STATUS file (#11) entries
59 ;;and then allows the user to designate, for each non-standard entry,
60 ;;a standard entry which this utility will re-point with associated patients.
61 ;;For example, you will be able to map all patients with a marital status
62 ;;of SINGLE to NEVER MARRIED.
63 ;;
64 ;;This mapping will be used during the re-pointing and file clean-up
65 ;;process, the Begin Religion/Marital Status Conversion [DG172 PRE-IMP
66 ;;START CONVERSION] option.
67 ;;
68 ;;The option (1) provides a list of non-standard MARITAL STATUS
69 ;;file entries to the screen or a printer, (2) prompts the user for
70 ;;a non-standard entry, and (3) then prompts for the standard
71 ;;entry which the utility will re-point with associated patients.
72 ;;
73RELIGION ;
74 ;;This option will identify non-standard RELIGION file (#13) entries and
75 ;;then allows the user to designate, for each non-standard entry, a
76 ;;standard entry which this utility will re-point associated patients.
77 ;;For example, you will be able to map all patients with a religion of
78 ;;XXXXXX to UNKNOWN/NO PREFERENCE.
79 ;;
80 ;;This linking will be used during the mapping and file clean-up
81 ;;process, Begin Religion/Marital Status Conversion [DG172 PRE-IMP
82 ;;START CONVERSION] option.
83 ;;
84 ;;The option (1) provides a list of non-standard RELIGION file
85 ;;entries to the screen or a printer, (2) prompts the user for
86 ;;a non-standard entry, and (3) then prompts for the standard
87 ;;entry which the utility will re-point with associated patients.
88 ;;
89CONV ;
90 ;;After the linking of non-standard entries is complete, this conversion
91 ;;process is run in order to actually re-point patient records from
92 ;;non-standard entries to the specified standard entries.
93 ;;
Note: See TracBrowser for help on using the repository browser.