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

DGPTFUT1.m

Go to the documentation of this file.
  1. DGPTFUT1 ;ALBOI/KCL - PTF UTILITIES CONTINUED;10/14/14
  1. ;;5.3;Registration;**884**;Aug 13, 1993;Build 31
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;direct entry not allowed
  1. QUIT
  1. ;
  1. POA501(DGX,DGDA1,DGDA,DGNODE,DGPIECE) ;called from input transforms of POA fields in 501 (#45.02) sub-file
  1. ;This function will check to see if the 501 Movement ICD/Dx field associated with POA being
  1. ;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
  1. ;
  1. ; Input:
  1. ; DGX - (required) user input for field
  1. ; DGDA1 - (required) ien of record in PTF (#45) file
  1. ; DGDA - (required) ien of record in 501 (#45.02) sub-file
  1. ; DGNODE - (required) node of 501 Movement ICD/Dx field associated with POA field
  1. ; DGPIECE - (required) piece of 501 Movement ICD/Dx field associated with POA field
  1. ;
  1. ; Output:
  1. ; DGRSLT - (function value)
  1. ; 1 if user input permitted
  1. ; 0 if user input not permitted and output from EN^DDIOL
  1. ;
  1. N DGMSG
  1. N DGRSLT
  1. ;
  1. S DGRSLT=0
  1. ;
  1. ;check for required input
  1. Q:'$D(DGX) DGRSLT
  1. Q:'$G(DGDA1) DGRSLT
  1. Q:'$G(DGDA) DGRSLT
  1. Q:$G(DGNODE)']"" DGRSLT
  1. Q:'$G(DGPIECE) DGRSLT
  1. ;
  1. S DGRSLT=1
  1. ;
  1. ;check for 501 Movement ICD/Diagnosis field associated with POA indicator
  1. I $P($G(^DGPT(DGDA1,"M",DGDA,DGNODE)),U,DGPIECE)="" D
  1. . S DGRSLT=0
  1. . S DGMSG(1)=" "
  1. . S DGMSG(2)="Please enter the ICD for this POA first!"
  1. . S DGMSG(2,"F")="!?3"
  1. . S DGMSG(3)=" "
  1. . D EN^DDIOL(.DGMSG)
  1. ;
  1. Q DGRSLT
  1. ;
  1. ;
  1. POA701(DGX,DGDA,DGNODE,DGPIECE) ;called from input transforms of POA fields in 701 Primary/Secondary Dx fields
  1. ;This function will check to see if the 701 Primary/Secondary Dx field associated with POA being
  1. ;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
  1. ;
  1. ; Input:
  1. ; DGX - (required) user input for field
  1. ; DGDA - (required) ien of record in PTF (#45) file
  1. ; DGNODE - (required) node of 701 Primary/Secondary Dx field associated with POA field
  1. ; DGPIECE - (required) piece of 701 Primary/Secondary Dx field associated with POA field
  1. ;
  1. ; Output:
  1. ; DGRSLT - (function value)
  1. ; 1 if user input permitted
  1. ; 0 if user input not permitted and output from EN^DDIOL
  1. ;
  1. N DGMSG
  1. N DGRSLT
  1. ;
  1. S DGRSLT=0
  1. ;
  1. ;check for required input
  1. Q:'$D(DGX) DGRSLT
  1. Q:'$G(DGDA) DGRSLT
  1. Q:$G(DGNODE)']"" DGRSLT
  1. Q:'$G(DGPIECE) DGRSLT
  1. ;
  1. S DGRSLT=1
  1. ;
  1. ;check for 701 Primary/Secondary Dx field associated with POA indicator
  1. I $P($G(^DGPT(DGDA,DGNODE)),U,DGPIECE)="" D
  1. . S DGRSLT=0
  1. . S DGMSG(1)=" "
  1. . S DGMSG(2)="Please enter the Diagnosis for this POA first!"
  1. . S DGMSG(2,"F")="!?3"
  1. . S DGMSG(3)=" "
  1. . D EN^DDIOL(.DGMSG)
  1. ;
  1. Q DGRSLT