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

VAFCDODA.m

Go to the documentation of this file.
  1. VAFCDODA ;BIR/CML-Accept Date of Death Updates Utilities ;6/23/16
  1. ;;5.3;Registration;**926**;Aug 13, 1993;Build 6
  1. ;
  1. ; Routine created for DG*5.3*926 Story #340909 (cml)
  1. ;
  1. CHK() ; API to return value of PROCESS MVI DOD UPDATE? field (#1401) in MAS Parameters file (#43)
  1. ; Return 1 if value is set to "YES" (1); otherwise return 0
  1. N RES S RES=1
  1. I $P($G(^DG(43,1,"MVI")),"^")'=1 S RES=0
  1. Q RES
  1. ;
  1. EN(RET,TYPE,SET) ; API called from RPC [] to update or display the PROCESS MVI DOD UPDATE? (#1401) field in MAS Parameters (#43)
  1. ;TYPE: the type of action:
  1. ; If TYPE="S", this is a remote call from the MPI to toggle the value to set the PROCESS MVI DOD UPDATE? (#1401)
  1. ; field in MAS Parameters (#43) at a specific site.
  1. ; If TYPE="D", this is a remote call from the MPI to return the current setting of the PROCESS MVI DOD UPDATE? (#1401)
  1. ; field in MAS Parameters (#43) at a specific site.
  1. ;SET: If TYPE="S", SET is the value PROCESS MVI DOD UPDATE? is to be set to. (1:YES, 0:NO)
  1. ;
  1. N SITE,SITENAM,SITENUM
  1. S SITE=$$SITE^VASITE,SITENAM=$P(SITE,"^",2),SITENUM=$P(SITE,"^",3)
  1. ;
  1. I TYPE'="S"&(TYPE'="D") S RET(1)="-1:Station #"_SITENUM_" - Invalid TYPE sent for PROCESS MVI DOD UPDATE? field request." Q
  1. I TYPE="S" I SET'=1&(SET'=0) S RET(1)="-1:Station #"_SITENUM_" - Invalid update parameter sent for PROCESS MVI DOD UPDATE? field" Q
  1. I TYPE="S" I SET=1!(SET=0) D SET Q
  1. I TYPE="D" D DISP Q
  1. ;
  1. DISP ; Return display of PROCESS MVI DOD UPDATE? field (#1401) in MAS Parameters file (#43) set to "YES" (1); otherwise return 0
  1. N IEN
  1. S IEN=$O(^DG(43,0))
  1. Q:IEN<1
  1. S RET(1)="1:Station #"_SITENUM_" - PROCESS MVI DOD UPDATE? set to 'YES'"
  1. I $P($G(^DG(43,IEN,"MVI")),"^")'=1 S RET(1)="1:Station #"_SITENUM_" - PROCESS MVI DOD UPDATE? set to 'NO' or null"
  1. Q
  1. ;
  1. SET ; Update PROCESS MVI DOD UPDATE? field (#1401) in MAS Parameters file (#43)
  1. ;
  1. N IEN,VAL,DIE,DA,DR
  1. S IEN=$O(^DG(43,0))
  1. Q:IEN<1
  1. S DIE="^DG(43,",DA=IEN,DR="1401////^S X=SET"
  1. D ^DIE
  1. S VAL=$P($G(^DG(43,IEN,"MVI")),"^")
  1. I VAL=1 S RET(1)="1:Station #"_SITENUM_" - PROCESS MVI DOD UPDATE? set to 'YES'"
  1. I VAL=0!(VAL="") S RET(1)="1:Station #"_SITENUM_" - PROCESS MVI DOD UPDATE? set to 'NO' or null"
  1. Q