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

DGMFA11.m

Go to the documentation of this file.
  1. DGMFA11 ;DAL/JCH - NDS DEMOGRAPHICS MARITAL STATUS ASSOCIATION ;15-AUG-2017
  1. ;;5.3;Registration;**933**;Aug 13, 1993;Build 44
  1. ;
  1. Q
  1. ;
  1. ; Available at Master File Association Enter/Edit [DGMF AMAIN] option, at the following menu path:
  1. ; Supervisor ADT Menu [DG SUPERVISOR MENU]
  1. ; ADT System Definition Menu [DG SYSTEM DEFINITION MENU]
  1. ; Master Demographics Files [DGMF MENU]
  1. ; Master File Association Enter/Edit [DGMF AMAIN]
  1. ;
  1. EN ; Allow users to populate the MASTER MARITAL STATUS field (#90) in MARITAL STATUS file (#11)
  1. D INFO ; Display option info
  1. D KILLTMP ; Kill ^TMP($J,"DGMFR11"
  1. N DGDONE ; Signal from user - Q:DGDONE
  1. S DGDONE=0
  1. ; Prompt for MARITAL STATUS file (#11) entries until user quits
  1. F Q:DGDONE D
  1. .N DIE,DA,DR,DIC,X,Y,DIR,DUOUT,DGMSI,DGMMSIV
  1. .N DGMSNAM,DGMS0,DGMMS0,DGEMMSI,DGMDONE,DGSUM
  1. .;
  1. .S DGMSI=$$GETMS(.DGDONE) Q:$G(DGDONE) ; Get Marital Status IEN
  1. .; Get info from 11 (inclding pointer to 10.99), store in ^TMP($J
  1. .D GETDATA(DGMSI,.DGMMSIV)
  1. .; Use MMS report to print MARITAL STATUS details
  1. .S DGSUM=1 D PRINMS^DGMFR11(DGMSI)
  1. .;
  1. .D UPDMS(DGMSI)
  1. .D GETDATA(DGMSI,.DGMMSI) ; Get updated data
  1. .I DGMMSI'=DGMMSIV D REDISP(DGMSI) ; Pointer chagned, display updated record
  1. .;
  1. .S DIR(0)="EA",DIR("A",1)="",DIR("A",2)="",DIR("A")="Press Return to continue " D ^DIR
  1. .D INFO
  1. D KILLTMP
  1. Q
  1. ;
  1. GETMS(DGDONE) ; Prompt user for Marital Status file (#11) entry
  1. N DIC,X,Y
  1. S DIC=11,DIC(0)="QEAMZ"
  1. F Q:$G(Y)>0!$G(DGDONE) D
  1. .W ! D ^DIC I $G(DUOUT)!$G(DTOUT)!($G(Y)<0) S DGDONE=1 Q ; Nothing selected, quit
  1. .N DGONAM
  1. .S DGONAM=$P($G(^DIC(11,+Y,0)),"^")
  1. .Q:'$D(^DGMMS(11.99,"AC",DGONAM))
  1. .; Use MFR11 report to print MARITAL STATUS details
  1. .D GETDATA(+Y)
  1. .S DGSUM=2 D PRINMS^DGMFR11(+Y)
  1. .W !!," * This entry has been associated to the MASTER MARITAL *",!," * STATUS file by Standards & Terminology Services (STS) *"
  1. .W !," * and can only be edited via the Master File Server (MFS). *"
  1. .K Y
  1. S DGMSI=+Y,DGMSNAM=$P(Y,"^",2)
  1. Q DGMSI
  1. ;
  1. UPDMS(DGMSI) ; Use DG AMSTAT input template to restrict input to Master Marital Status field
  1. S DIE="^DIC(11,"
  1. S DR="[DGMF AMSTAT]"
  1. S DA=DGMSI
  1. D ^DIE
  1. Q
  1. ;
  1. REDISP(DGMSI) ; Redisplay update RACE file (#10) entry
  1. W !!,"Update Successful...."
  1. D PRINMS^DGMFR11(DGMSI) ; display summarized Marital Status entry info
  1. Q
  1. ;
  1. INFO ; Display message, clear screen
  1. N MSG
  1. S MSG(1)=" This option allows MARITAL STATUS file entries to be"
  1. S MSG(2)=" associated with the MASTER MARITAL STATUS file to enhance"
  1. S MSG(3)=" interoperablity. The MASTER MARITAL STATUS file contains"
  1. S MSG(4)=" standard Health Level Seven (HL7) marital statuses."
  1. S MSG(5)=""
  1. D CLEAR^VALM1
  1. D BMES^XPDUTL(.MSG)
  1. Q
  1. ;
  1. GETDATA(DGMSI,DGMMSI) ; Define local variables and set into ^TMP($J
  1. S DGMS0=$G(^DIC(11,DGMSI,0))
  1. S DGMMSI=+$G(^DIC(11,DGMSI,"MASTER"))
  1. S DGMSST=+$G(^DIC(11,DGMSI,.02)),DGMSST=$S(DGMSST:"INACTIVE",1:"ACTIVE")
  1. S DGMMS0=$S($G(DGMMSI):$G(^DGMMS(11.99,+DGMMSI,0)),1:"Not Mapped")
  1. I DGMMSI S $P(DGMMS0,"^",4)=DGMMSI
  1. S ^TMP($J,"DGMFR11",DGMS0,DGMSI,"MSE")=$G(DGMS0)
  1. S ^TMP($J,"DGMFR11",DGMS0,DGMSI,"MMSE")=$G(DGMMS0)
  1. Q
  1. ;
  1. KILLTMP ; Kill ^TMP global
  1. K ^TMP($J,"DGMFR11")
  1. Q