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

IBENDS.m

Go to the documentation of this file.
  1. IBENDS ;DAL/JCH - NDS PAYERS MTOP UTILITIES ;15-JUN-2017
  1. ;;2.0;INTEGRATED BILLING;**585**;21-MAR-94;Build 68
  1. ;
  1. Q
  1. ;
  1. ; Available at Master Type of Plan Association [IBMTOP ASSN] option, at the following menu path:
  1. ; Billing Supervisor Menu [IB BILLING SUPERVISOR MENU]
  1. ; MCCR System Definition Menu [MCCR SYSTEM DEFINITION MENU]
  1. ; Master Type of Plan Menu [IBMTOP MNU]
  1. ; Master Type of Plan Association [IBMTOP ASSN]
  1. ;
  1. EN ; Allow users to populate the MASTER TYPE OF PLAN field (#15) in TYPE OF PLAN file (#355.1)
  1. D INFO,KILLTMP ; Display option info, kill ^TMP($J,"IBENDS1"
  1. N IBDONE ; Signal from user - Q:IBDONE
  1. N IBENAME ; TOP Name
  1. S IBDONE=0
  1. ; Prompt for TYPE OF PLAN (#355.1) entries until user quits
  1. F Q:IBDONE D
  1. .N DIE,DA,DR,DIC,X,Y,DIR,DUOUT,IBETOPY,IBETOPI,IBTOPNAM,IBETOP0,IBEMTOP0,IBEMTOPI,IBESUM,IBEMISV
  1. .;
  1. .; Prompt for TOP
  1. .S IBETOPI=+$$GETOP(.IBTOPNAM,.IBDONE) Q:$G(IBDONE)
  1. .;
  1. .; Get relevant info from 355.1 and 355.9, store in ^TMP($J
  1. .D GETDATA($G(IBTOPNAM),IBETOPI)
  1. .S IBENAME=$P(IBETOP0,"^")
  1. .S IBEMISV=$G(IBEMTOPI) ; Save associated master IEN, so we can check later if it's changed
  1. .;
  1. .; display Type of Plan record details, prompt for new MTOP pointer in TOP file
  1. .S IBESUM=2 D PRINTOP^IBENDS1(IBENAME,IBETOPI)
  1. .D UPDMTOP(IBETOPI) Q:$G(DUOUT)!$G(DTOUT)
  1. .D GETDATA($G(IBTOPNAM),IBETOPI) ; Get updated TOP (#355.1) details
  1. .;
  1. .I $G(IBEMTOPI)'=$G(IBEMISV) D ; MTOP pointer changed, re-display updated info
  1. ..D REDISP(IBENAME,IBETOPI)
  1. .;
  1. .S DIR(0)="EA",DIR("A",1)="",DIR("A",2)="",DIR("A")="Press Return to continue "
  1. .D ^DIR
  1. .D INFO
  1. D KILLTMP
  1. Q
  1. ;
  1. INFO ; Display message, clear screen
  1. N MSG
  1. S MSG(1)=" This option allows VA TYPE OF PLAN file entries to be associated with"
  1. S MSG(2)=" MASTER TYPE OF PLAN file entries to enhance interoperability. MASTER"
  1. S MSG(3)=" TYPE OF PLAN file entries represent the Source of Payment Typology"
  1. S MSG(4)=" developed by the Public Health Data Standards Consortium (PHDSC)."
  1. S MSG(5)=""
  1. D CLEAR^VALM1
  1. D BMES^XPDUTL(.MSG)
  1. Q
  1. ;
  1. GETOP(IBTOPNAM,IBDONE) ; Prompt for Type of Plan
  1. N DIC
  1. S DIC=355.1
  1. S DIC(0)="QEAMZ"
  1. W ! D ^DIC I Y<0 S IBDONE=1,Y=""
  1. S IBTOPNAM=$P(Y,"^",2)
  1. Q +Y
  1. ;
  1. UPDMTOP(IBMTOPI) ; Update Master Type of Plan field (#90) in TOP file (#355.1)
  1. ; Use IB TOPM input template to restrict input to MTOP field
  1. N DIE,DR,DA
  1. S DIE="^IBE(355.1,"
  1. S DR="[IB TOPM]"
  1. S DA=IBETOPI
  1. D ^DIE
  1. Q
  1. ;
  1. GETDATA(IBENAME,IBETOPI) ; Define local variables and set into ^TMP($J
  1. S IBETOP0=$G(^IBE(355.1,IBETOPI,0)),IBEMTOPI=$P(IBETOP0,"^",5)
  1. S IBTOPST=$P(IBETOP0,"^",4),IBTOPST=$S(IBTOPST:"INACTIVE",1:"ACTIVE")
  1. S IBEMTOP0=$S($G(IBEMTOPI):$G(^IBEMTOP(355.99,+IBEMTOPI,0)),1:"Not Mapped")
  1. I IBEMTOPI S $P(IBEMTOP0,"^",4)=IBEMTOPI
  1. S ^TMP($J,"IBENDS1",IBENAME,IBETOPI,"TOP")=$G(IBETOP0)
  1. S ^TMP($J,"IBENDS1",IBENAME,IBETOPI,"MTOP")=$G(IBEMTOP0)
  1. Q
  1. ;
  1. REDISP(IBENAME,IBETOPI) ; Redisplay updated Type of Plan (#355.1) entry
  1. W !!,"Update Successful...."
  1. S IBESUM=1 D PRINTOP^IBENDS1(IBENAME,IBETOPI) ; display summarized TOP entry info
  1. Q
  1. ;
  1. KILLTMP ; Kill ^TMP global
  1. K ^TMP($J,"IBENDS1")
  1. Q