- DGMFA11 ;DAL/JCH - NDS DEMOGRAPHICS MARITAL STATUS 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 MARITAL STATUS field (#90) in MARITAL STATUS file (#11)
- D INFO ; Display option info
- D KILLTMP ; Kill ^TMP($J,"DGMFR11"
- N DGDONE ; Signal from user - Q:DGDONE
- S DGDONE=0
- ; Prompt for MARITAL STATUS file (#11) entries until user quits
- F Q:DGDONE D
- .N DIE,DA,DR,DIC,X,Y,DIR,DUOUT,DGMSI,DGMMSIV
- .N DGMSNAM,DGMS0,DGMMS0,DGEMMSI,DGMDONE,DGSUM
- .;
- .S DGMSI=$$GETMS(.DGDONE) Q:$G(DGDONE) ; Get Marital Status IEN
- .; Get info from 11 (inclding pointer to 10.99), store in ^TMP($J
- .D GETDATA(DGMSI,.DGMMSIV)
- .; Use MMS report to print MARITAL STATUS details
- .S DGSUM=1 D PRINMS^DGMFR11(DGMSI)
- .;
- .D UPDMS(DGMSI)
- .D GETDATA(DGMSI,.DGMMSI) ; Get updated data
- .I DGMMSI'=DGMMSIV D REDISP(DGMSI) ; Pointer chagned, 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
- ;
- GETMS(DGDONE) ; Prompt user for Marital Status file (#11) entry
- N DIC,X,Y
- S DIC=11,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(11,+Y,0)),"^")
- .Q:'$D(^DGMMS(11.99,"AC",DGONAM))
- .; Use MFR11 report to print MARITAL STATUS details
- .D GETDATA(+Y)
- .S DGSUM=2 D PRINMS^DGMFR11(+Y)
- .W !!," * This entry has been associated to the MASTER MARITAL *",!," * STATUS file by Standards & Terminology Services (STS) *"
- .W !," * and can only be edited via the Master File Server (MFS). *"
- .K Y
- S DGMSI=+Y,DGMSNAM=$P(Y,"^",2)
- Q DGMSI
- ;
- UPDMS(DGMSI) ; Use DG AMSTAT input template to restrict input to Master Marital Status field
- S DIE="^DIC(11,"
- S DR="[DGMF AMSTAT]"
- S DA=DGMSI
- D ^DIE
- Q
- ;
- REDISP(DGMSI) ; Redisplay update RACE file (#10) entry
- W !!,"Update Successful...."
- D PRINMS^DGMFR11(DGMSI) ; display summarized Marital Status entry info
- Q
- ;
- INFO ; Display message, clear screen
- N MSG
- S MSG(1)=" This option allows MARITAL STATUS file entries to be"
- S MSG(2)=" associated with the MASTER MARITAL STATUS file to enhance"
- S MSG(3)=" interoperablity. The MASTER MARITAL STATUS file contains"
- S MSG(4)=" standard Health Level Seven (HL7) marital statuses."
- S MSG(5)=""
- D CLEAR^VALM1
- D BMES^XPDUTL(.MSG)
- Q
- ;
- GETDATA(DGMSI,DGMMSI) ; Define local variables and set into ^TMP($J
- S DGMS0=$G(^DIC(11,DGMSI,0))
- S DGMMSI=+$G(^DIC(11,DGMSI,"MASTER"))
- S DGMSST=+$G(^DIC(11,DGMSI,.02)),DGMSST=$S(DGMSST:"INACTIVE",1:"ACTIVE")
- S DGMMS0=$S($G(DGMMSI):$G(^DGMMS(11.99,+DGMMSI,0)),1:"Not Mapped")
- I DGMMSI S $P(DGMMS0,"^",4)=DGMMSI
- S ^TMP($J,"DGMFR11",DGMS0,DGMSI,"MSE")=$G(DGMS0)
- S ^TMP($J,"DGMFR11",DGMS0,DGMSI,"MMSE")=$G(DGMMS0)
- Q
- ;
- KILLTMP ; Kill ^TMP global
- K ^TMP($J,"DGMFR11")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGMFA11 3313 printed Dec 13, 2024@02:44:08 Page 2
- DGMFA11 ;DAL/JCH - NDS DEMOGRAPHICS MARITAL STATUS 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 MARITAL STATUS field (#90) in MARITAL STATUS file (#11)
- +1 ; Display option info
- DO INFO
- +2 ; Kill ^TMP($J,"DGMFR11"
- DO KILLTMP
- +3 ; Signal from user - Q:DGDONE
- NEW DGDONE
- +4 SET DGDONE=0
- +5 ; Prompt for MARITAL STATUS file (#11) entries until user quits
- +6 FOR
- if DGDONE
- QUIT
- Begin DoDot:1
- +7 NEW DIE,DA,DR,DIC,X,Y,DIR,DUOUT,DGMSI,DGMMSIV
- +8 NEW DGMSNAM,DGMS0,DGMMS0,DGEMMSI,DGMDONE,DGSUM
- +9 ;
- +10 ; Get Marital Status IEN
- SET DGMSI=$$GETMS(.DGDONE)
- if $GET(DGDONE)
- QUIT
- +11 ; Get info from 11 (inclding pointer to 10.99), store in ^TMP($J
- +12 DO GETDATA(DGMSI,.DGMMSIV)
- +13 ; Use MMS report to print MARITAL STATUS details
- +14 SET DGSUM=1
- DO PRINMS^DGMFR11(DGMSI)
- +15 ;
- +16 DO UPDMS(DGMSI)
- +17 ; Get updated data
- DO GETDATA(DGMSI,.DGMMSI)
- +18 ; Pointer chagned, display updated record
- IF DGMMSI'=DGMMSIV
- DO REDISP(DGMSI)
- +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 ;
- GETMS(DGDONE) ; Prompt user for Marital Status file (#11) entry
- +1 NEW DIC,X,Y
- +2 SET DIC=11
- 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(11,+Y,0)),"^")
- +7 if '$DATA(^DGMMS(11.99,"AC",DGONAM))
- QUIT
- +8 ; Use MFR11 report to print MARITAL STATUS details
- +9 DO GETDATA(+Y)
- +10 SET DGSUM=2
- DO PRINMS^DGMFR11(+Y)
- +11 WRITE !!," * This entry has been associated to the MASTER MARITAL *",!," * STATUS file by Standards & Terminology Services (STS) *"
- +12 WRITE !," * and can only be edited via the Master File Server (MFS). *"
- +13 KILL Y
- End DoDot:1
- +14 SET DGMSI=+Y
- SET DGMSNAM=$PIECE(Y,"^",2)
- +15 QUIT DGMSI
- +16 ;
- UPDMS(DGMSI) ; Use DG AMSTAT input template to restrict input to Master Marital Status field
- +1 SET DIE="^DIC(11,"
- +2 SET DR="[DGMF AMSTAT]"
- +3 SET DA=DGMSI
- +4 DO ^DIE
- +5 QUIT
- +6 ;
- REDISP(DGMSI) ; Redisplay update RACE file (#10) entry
- +1 WRITE !!,"Update Successful...."
- +2 ; display summarized Marital Status entry info
- DO PRINMS^DGMFR11(DGMSI)
- +3 QUIT
- +4 ;
- INFO ; Display message, clear screen
- +1 NEW MSG
- +2 SET MSG(1)=" This option allows MARITAL STATUS file entries to be"
- +3 SET MSG(2)=" associated with the MASTER MARITAL STATUS file to enhance"
- +4 SET MSG(3)=" interoperablity. The MASTER MARITAL STATUS file contains"
- +5 SET MSG(4)=" standard Health Level Seven (HL7) marital statuses."
- +6 SET MSG(5)=""
- +7 DO CLEAR^VALM1
- +8 DO BMES^XPDUTL(.MSG)
- +9 QUIT
- +10 ;
- GETDATA(DGMSI,DGMMSI) ; Define local variables and set into ^TMP($J
- +1 SET DGMS0=$GET(^DIC(11,DGMSI,0))
- +2 SET DGMMSI=+$GET(^DIC(11,DGMSI,"MASTER"))
- +3 SET DGMSST=+$GET(^DIC(11,DGMSI,.02))
- SET DGMSST=$SELECT(DGMSST:"INACTIVE",1:"ACTIVE")
- +4 SET DGMMS0=$SELECT($GET(DGMMSI):$GET(^DGMMS(11.99,+DGMMSI,0)),1:"Not Mapped")
- +5 IF DGMMSI
- SET $PIECE(DGMMS0,"^",4)=DGMMSI
- +6 SET ^TMP($JOB,"DGMFR11",DGMS0,DGMSI,"MSE")=$GET(DGMS0)
- +7 SET ^TMP($JOB,"DGMFR11",DGMS0,DGMSI,"MMSE")=$GET(DGMMS0)
- +8 QUIT
- +9 ;
- KILLTMP ; Kill ^TMP global
- +1 KILL ^TMP($JOB,"DGMFR11")
- +2 QUIT