DGMFA13 ;DAL/JCH - NDS DEMOGRAPHICS RELIGION ASSOCIATION ;15-AUG-2017
;;5.3;Registration;**933**;Aug 13, 1993;Build 44
;
Q
;
; Available at Master File Association Enter/Edit [DGMF AMAIN] option, at the following menu path:
; Supervisor ADT Menu [DG SUPERVISOR MENU]
; ADT System Definition Menu [DG SYSTEM DEFINITION MENU]
; Master Demographics Files [DGMF MENU]
; Master File Association Enter/Edit [DGMF AMAIN]
;
EN ; Allow users to populate the MASTER RELIGION field (#90) in RELIGION file (#13)
D INFO ; Display option info
D KILLTMP ; Kill ^TMP($J,"DGMFR13"
N DGDONE ; Signal from user - Q:DGDONE
S DGDONE=0
; Prompt for RELIGION (#13) entries until user quits
F Q:DGDONE D
.N DIE,DA,DR,DIC,X,Y,DIR,DUOUT,DGMRI,DGMMRIV
.N DGMRNAM,DGMR0,DGMMR0,DGEMMRI,DGMDONE,DGSUM
.;
.S DGMRI=$$GETMR(.DGDONE) Q:$G(DGDONE) ; Get Religion file (#13) entry
.; Get info from 13 (including pointer to 13.99), store in ^TMP($J
.D GETDATA(DGMRI,.DGMMRIV)
.; Use report to print details
.S DGSUM=1 D PRINMR^DGMFR13(DGMRI)
.;
.D UPDMR(DGMRI)
.D GETDATA(DGMRI,.DGMMRIV) ; Done editing, get data again
.I DGMMRI'=DGMMRIV D REDISP(DGMRI) ; Pointer changed, display updated record
.;
.S DIR(0)="EA",DIR("A",1)="",DIR("A",2)="",DIR("A")="Press Return to continue " D ^DIR
.D INFO
D KILLTMP
Q
;
GETMR(DGDONE) ; Prompt user for RELIGION file (#13) entry
N DIC
S DIC=13,DIC(0)="QEAMZ"
F Q:$G(Y)>0!$G(DGDONE) D
.W ! D ^DIC I $G(DUOUT)!$G(DTOUT)!($G(Y)<0) S DGDONE=1 Q ; Nothing selected, quit
.N DGONAM
.S DGONAM=$P($G(^DIC(13,+Y,0)),"^")
.Q:'$D(^DGMR(13.99,"AC",DGONAM))
.; Use MFR13 report to print RELIGION details
.D GETDATA(+Y)
.S DGSUM=2 D PRINMR^DGMFR13(+Y)
.W !!," * This entry has been associated to the MASTER RELIGION *",!," * file by Standards & Terminology Services (STS) and *"
.W !," * may only be edited via the Master File Server (MFS). *"
.K Y
S DGMRI=+Y,DGMRNAM=$P(Y,"^",2)
Q DGMRI
;
UPDMR(DGMRI) ; Use DGF AMREL input template to restrict input to Master Marital Status field
S DIE="^DIC(13,"
S DR="[DGMF AMREL]"
S DA=DGMRI
D ^DIE
Q
;
REDISP(DGMRI) ; Redisplay updated MARITAL STATUS file (#13) entry
W !!,"Update Successful..."
D PRINMR^DGMFR13(DGMRI) ; display summarized plan info
Q
L
INFO ; Display message, clear screen
N MSG
S MSG(1)=" This option allows RELIGION file entries to be"
S MSG(2)=" associated with the MASTER RELIGION file to enhance "
S MSG(3)=" interoperablity. The MASTER RELIGION file contains"
S MSG(4)=" standard Health Level Seven (HL7) religions."
S MSG(5)=""
D CLEAR^VALM1
D BMES^XPDUTL(.MSG)
Q
;
GETDATA(DGMRI,DGMMRI) ; Define local variables and set into ^TMP($J
S DGMR0=$G(^DIC(13,DGMRI,0))
S DGMMRI=+$G(^DIC(13,DGMRI,"MASTER"))
S DGMRST=+$G(^DIC(13,DGMRI,.02)),DGMRST=$S(DGMRST:"INACTIVE",1:"ACTIVE")
S DGMMR0=$S($G(DGMMRI):$G(^DGMR(13.99,+DGMMRI,0)),1:"Not Mapped")
I DGMMRI S $P(DGMMR0,"^",4)=DGMMRI
S ^TMP($J,"DGMFR13",DGMR0,DGMRI,"MRE")=$G(DGMR0)
S ^TMP($J,"DGMFR13",DGMR0,DGMRI,"MMRE")=$G(DGMMR0)
Q
;
KILLTMP ; Kill ^TMP global
K ^TMP($J,"DGMFR13")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGMFA13 3224 printed Nov 22, 2024@17:54:08 Page 2
DGMFA13 ;DAL/JCH - NDS DEMOGRAPHICS RELIGION ASSOCIATION ;15-AUG-2017
+1 ;;5.3;Registration;**933**;Aug 13, 1993;Build 44
+2 ;
+3 QUIT
+4 ;
+5 ; Available at Master File Association Enter/Edit [DGMF AMAIN] option, at the following menu path:
+6 ; Supervisor ADT Menu [DG SUPERVISOR MENU]
+7 ; ADT System Definition Menu [DG SYSTEM DEFINITION MENU]
+8 ; Master Demographics Files [DGMF MENU]
+9 ; Master File Association Enter/Edit [DGMF AMAIN]
+10 ;
EN ; Allow users to populate the MASTER RELIGION field (#90) in RELIGION file (#13)
+1 ; Display option info
DO INFO
+2 ; Kill ^TMP($J,"DGMFR13"
DO KILLTMP
+3 ; Signal from user - Q:DGDONE
NEW DGDONE
+4 SET DGDONE=0
+5 ; Prompt for RELIGION (#13) entries until user quits
+6 FOR
if DGDONE
QUIT
Begin DoDot:1
+7 NEW DIE,DA,DR,DIC,X,Y,DIR,DUOUT,DGMRI,DGMMRIV
+8 NEW DGMRNAM,DGMR0,DGMMR0,DGEMMRI,DGMDONE,DGSUM
+9 ;
+10 ; Get Religion file (#13) entry
SET DGMRI=$$GETMR(.DGDONE)
if $GET(DGDONE)
QUIT
+11 ; Get info from 13 (including pointer to 13.99), store in ^TMP($J
+12 DO GETDATA(DGMRI,.DGMMRIV)
+13 ; Use report to print details
+14 SET DGSUM=1
DO PRINMR^DGMFR13(DGMRI)
+15 ;
+16 DO UPDMR(DGMRI)
+17 ; Done editing, get data again
DO GETDATA(DGMRI,.DGMMRIV)
+18 ; Pointer changed, display updated record
IF DGMMRI'=DGMMRIV
DO REDISP(DGMRI)
+19 ;
+20 SET DIR(0)="EA"
SET DIR("A",1)=""
SET DIR("A",2)=""
SET DIR("A")="Press Return to continue "
DO ^DIR
+21 DO INFO
End DoDot:1
+22 DO KILLTMP
+23 QUIT
+24 ;
GETMR(DGDONE) ; Prompt user for RELIGION file (#13) entry
+1 NEW DIC
+2 SET DIC=13
SET DIC(0)="QEAMZ"
+3 FOR
if $GET(Y)>0!$GET(DGDONE)
QUIT
Begin DoDot:1
+4 ; Nothing selected, quit
WRITE !
DO ^DIC
IF $GET(DUOUT)!$GET(DTOUT)!($GET(Y)<0)
SET DGDONE=1
QUIT
+5 NEW DGONAM
+6 SET DGONAM=$PIECE($GET(^DIC(13,+Y,0)),"^")
+7 if '$DATA(^DGMR(13.99,"AC",DGONAM))
QUIT
+8 ; Use MFR13 report to print RELIGION details
+9 DO GETDATA(+Y)
+10 SET DGSUM=2
DO PRINMR^DGMFR13(+Y)
+11 WRITE !!," * This entry has been associated to the MASTER RELIGION *",!," * file by Standards & Terminology Services (STS) and *"
+12 WRITE !," * may only be edited via the Master File Server (MFS). *"
+13 KILL Y
End DoDot:1
+14 SET DGMRI=+Y
SET DGMRNAM=$PIECE(Y,"^",2)
+15 QUIT DGMRI
+16 ;
UPDMR(DGMRI) ; Use DGF AMREL input template to restrict input to Master Marital Status field
+1 SET DIE="^DIC(13,"
+2 SET DR="[DGMF AMREL]"
+3 SET DA=DGMRI
+4 DO ^DIE
+5 QUIT
+6 ;
REDISP(DGMRI) ; Redisplay updated MARITAL STATUS file (#13) entry
+1 WRITE !!,"Update Successful..."
+2 ; display summarized plan info
DO PRINMR^DGMFR13(DGMRI)
+3 QUIT
+4 LOCK
INFO ; Display message, clear screen
+1 NEW MSG
+2 SET MSG(1)=" This option allows RELIGION file entries to be"
+3 SET MSG(2)=" associated with the MASTER RELIGION file to enhance "
+4 SET MSG(3)=" interoperablity. The MASTER RELIGION file contains"
+5 SET MSG(4)=" standard Health Level Seven (HL7) religions."
+6 SET MSG(5)=""
+7 DO CLEAR^VALM1
+8 DO BMES^XPDUTL(.MSG)
+9 QUIT
+10 ;
GETDATA(DGMRI,DGMMRI) ; Define local variables and set into ^TMP($J
+1 SET DGMR0=$GET(^DIC(13,DGMRI,0))
+2 SET DGMMRI=+$GET(^DIC(13,DGMRI,"MASTER"))
+3 SET DGMRST=+$GET(^DIC(13,DGMRI,.02))
SET DGMRST=$SELECT(DGMRST:"INACTIVE",1:"ACTIVE")
+4 SET DGMMR0=$SELECT($GET(DGMMRI):$GET(^DGMR(13.99,+DGMMRI,0)),1:"Not Mapped")
+5 IF DGMMRI
SET $PIECE(DGMMR0,"^",4)=DGMMRI
+6 SET ^TMP($JOB,"DGMFR13",DGMR0,DGMRI,"MRE")=$GET(DGMR0)
+7 SET ^TMP($JOB,"DGMFR13",DGMR0,DGMRI,"MMRE")=$GET(DGMMR0)
+8 QUIT
+9 ;
KILLTMP ; Kill ^TMP global
+1 KILL ^TMP($JOB,"DGMFR13")
+2 QUIT