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

DG17204.m

Go to the documentation of this file.
  1. DG17204 ;BHM/RGY,ALS-Edit mapping entries ;FEB 20, 1998
  1. ;;5.3;Registration;**172,1015**;Aug 13, 1993;Build 21
  1. EDIT(TYPE) ;
  1. NEW DA,DIE,DR,L,TO,FR,DIC,FLDS,BY
  1. F X=0:0 S X=$O(^XTMP("DGTMP",390.2,X)) Q:'X I $P(^(X,0),"^",2)=TYPE,'$P(^(0),"^",3) Q
  1. I 'X W !!,"*** No mapping necessary! ***",! K X Q
  1. W !! D MESS($S(TYPE=11:"MARITAL",1:"RELIGION")) W !
  1. S L=0,DIC="^XTMP(""DGTMP"",390.2,",(TO,FR)="",(BY,FLDS)="[DG172 "_$S(TYPE=11:"MARITAL",1:"RELIGION")_" MAPPING]"
  1. D EN1^DIP
  1. START ;
  1. 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
  1. S DIE="^XTMP(""DGTMP"",390.2,",DR=$S(TYPE=11:.07,1:.06)
  1. D ^DIE
  1. K Y
  1. W ! G START
  1. BROAD ;
  1. NEW D0,DG172,TASK,XMY,XMDUZ,XMTEXT,XMSUB,N0,COUNT,TYPE
  1. S XMDUZ="Religion/Marital Status Conversion",XMSUB="Conversion Finished"
  1. S XMY(DUZ)="",XMTEXT="DG172(1,"
  1. F TASK=0:0 S TASK=$O(^XTMP("DGTMP",390.1,TASK)) Q:'TASK D
  1. .I $P(^XTMP("DGTMP",390.1,TASK,0),"^",9)="" S XMSUB="Conversion *NOT* Finished"
  1. .Q
  1. I XMSUB["NOT" D Q
  1. .S DG172(1,1)="The conversion process appears to have been stopped."
  1. .S DG172(1,2)="To finish the conversion process, restart by using"
  1. .S DG172(1,3)="the 'Begin Religion/Marital Status Conversion' option"
  1. .S DG172(1,4)="on the CIRN Pre-Implementation Menu."
  1. .D ^XMD
  1. .Q
  1. S COUNT=1
  1. F TYPE=11,13 D
  1. .S DG172(1,COUNT)=$S(TYPE=11:"Marital Status",1:"Religion")_" File Non-Standard Entries:",COUNT=COUNT+1
  1. .S DG172(1,COUNT)="=========================================",COUNT=COUNT+1
  1. .F D0=0:0 S D0=$O(^XTMP("DGTMP",390.2,D0)) Q:'D0 D
  1. ..S N0=$G(^XTMP("DGTMP",390.2,D0,0))
  1. ..I $P(N0,"^",2)'=TYPE Q
  1. ..I '$P(N0,"^",3) S DG172(1,COUNT)=$$DESC(N0)_" (# Converted: "_(+$P(N0,"^",9))_")"
  1. ..S COUNT=COUNT+1
  1. ..Q
  1. .S DG172(1,COUNT)=" ",COUNT=COUNT+1
  1. .Q
  1. S DG172(1,COUNT)=" ",COUNT=COUNT+1
  1. S DG172(1,COUNT)="All non-standard entries listed above have been removed",COUNT=COUNT+1
  1. S DG172(1,COUNT)="from their respective files.",COUNT=COUNT+1
  1. D ^XMD
  1. Q
  1. DESC(N0) ;
  1. NEW TYPE
  1. S TYPE=$P(N0,"^",2)
  1. I TYPE=13 Q "Entry: "_$P($G(^DIC(13,+$P(N0,"^",4),0)),"^")_" repointed to: "_$P($G(^DIC(13,+$P(N0,"^",6),0)),"^")
  1. I TYPE=11 Q "Entry: "_$P($G(^DIC(11,+$P(N0,"^",5),0)),"^")_" repointed to: "_$P($G(^DIC(11,+$P(N0,"^",7),0)),"^")
  1. Q ""
  1. MESS(M) ;Show message
  1. NEW C
  1. F C=1:1 Q:$P($T(@M+C),";;",2)="" W !,$P($T(@M+C),";;",2)
  1. Q
  1. MARITAL ;
  1. ;;This option will identify non-standard MARITAL STATUS file (#11) entries
  1. ;;and then allows the user to designate, for each non-standard entry,
  1. ;;a standard entry which this utility will re-point with associated patients.
  1. ;;For example, you will be able to map all patients with a marital status
  1. ;;of SINGLE to NEVER MARRIED.
  1. ;;
  1. ;;This mapping will be used during the re-pointing and file clean-up
  1. ;;process, the Begin Religion/Marital Status Conversion [DG172 PRE-IMP
  1. ;;START CONVERSION] option.
  1. ;;
  1. ;;The option (1) provides a list of non-standard MARITAL STATUS
  1. ;;file entries to the screen or a printer, (2) prompts the user for
  1. ;;a non-standard entry, and (3) then prompts for the standard
  1. ;;entry which the utility will re-point with associated patients.
  1. ;;
  1. RELIGION ;
  1. ;;This option will identify non-standard RELIGION file (#13) entries and
  1. ;;then allows the user to designate, for each non-standard entry, a
  1. ;;standard entry which this utility will re-point associated patients.
  1. ;;For example, you will be able to map all patients with a religion of
  1. ;;XXXXXX to UNKNOWN/NO PREFERENCE.
  1. ;;
  1. ;;This linking will be used during the mapping and file clean-up
  1. ;;process, Begin Religion/Marital Status Conversion [DG172 PRE-IMP
  1. ;;START CONVERSION] option.
  1. ;;
  1. ;;The option (1) provides a list of non-standard RELIGION file
  1. ;;entries to the screen or a printer, (2) prompts the user for
  1. ;;a non-standard entry, and (3) then prompts for the standard
  1. ;;entry which the utility will re-point with associated patients.
  1. ;;
  1. CONV ;
  1. ;;After the linking of non-standard entries is complete, this conversion
  1. ;;process is run in order to actually re-point patient records from
  1. ;;non-standard entries to the specified standard entries.
  1. ;;