DGPTFUT1 ;ALBOI/KCL - PTF UTILITIES CONTINUED;10/14/14
;;5.3;Registration;**884**;Aug 13, 1993;Build 31
;;Per VA Directive 6402, this routine should not be modified.
;
;direct entry not allowed
QUIT
;
POA501(DGX,DGDA1,DGDA,DGNODE,DGPIECE) ;called from input transforms of POA fields in 501 (#45.02) sub-file
;This function will check to see if the 501 Movement ICD/Dx field associated with POA being
;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
;
; Input:
; DGX - (required) user input for field
; DGDA1 - (required) ien of record in PTF (#45) file
; DGDA - (required) ien of record in 501 (#45.02) sub-file
; DGNODE - (required) node of 501 Movement ICD/Dx field associated with POA field
; DGPIECE - (required) piece of 501 Movement ICD/Dx field associated with POA field
;
; Output:
; DGRSLT - (function value)
; 1 if user input permitted
; 0 if user input not permitted and output from EN^DDIOL
;
N DGMSG
N DGRSLT
;
S DGRSLT=0
;
;check for required input
Q:'$D(DGX) DGRSLT
Q:'$G(DGDA1) DGRSLT
Q:'$G(DGDA) DGRSLT
Q:$G(DGNODE)']"" DGRSLT
Q:'$G(DGPIECE) DGRSLT
;
S DGRSLT=1
;
;check for 501 Movement ICD/Diagnosis field associated with POA indicator
I $P($G(^DGPT(DGDA1,"M",DGDA,DGNODE)),U,DGPIECE)="" D
. S DGRSLT=0
. S DGMSG(1)=" "
. S DGMSG(2)="Please enter the ICD for this POA first!"
. S DGMSG(2,"F")="!?3"
. S DGMSG(3)=" "
. D EN^DDIOL(.DGMSG)
;
Q DGRSLT
;
;
POA701(DGX,DGDA,DGNODE,DGPIECE) ;called from input transforms of POA fields in 701 Primary/Secondary Dx fields
;This function will check to see if the 701 Primary/Secondary Dx field associated with POA being
;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
;
; Input:
; DGX - (required) user input for field
; DGDA - (required) ien of record in PTF (#45) file
; DGNODE - (required) node of 701 Primary/Secondary Dx field associated with POA field
; DGPIECE - (required) piece of 701 Primary/Secondary Dx field associated with POA field
;
; Output:
; DGRSLT - (function value)
; 1 if user input permitted
; 0 if user input not permitted and output from EN^DDIOL
;
N DGMSG
N DGRSLT
;
S DGRSLT=0
;
;check for required input
Q:'$D(DGX) DGRSLT
Q:'$G(DGDA) DGRSLT
Q:$G(DGNODE)']"" DGRSLT
Q:'$G(DGPIECE) DGRSLT
;
S DGRSLT=1
;
;check for 701 Primary/Secondary Dx field associated with POA indicator
I $P($G(^DGPT(DGDA,DGNODE)),U,DGPIECE)="" D
. S DGRSLT=0
. S DGMSG(1)=" "
. S DGMSG(2)="Please enter the Diagnosis for this POA first!"
. S DGMSG(2,"F")="!?3"
. S DGMSG(3)=" "
. D EN^DDIOL(.DGMSG)
;
Q DGRSLT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGPTFUT1 2829 printed Dec 13, 2024@02:52:41 Page 2
DGPTFUT1 ;ALBOI/KCL - PTF UTILITIES CONTINUED;10/14/14
+1 ;;5.3;Registration;**884**;Aug 13, 1993;Build 31
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;direct entry not allowed
+5 QUIT
+6 ;
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
+2 ;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
+3 ;
+4 ; Input:
+5 ; DGX - (required) user input for field
+6 ; DGDA1 - (required) ien of record in PTF (#45) file
+7 ; DGDA - (required) ien of record in 501 (#45.02) sub-file
+8 ; DGNODE - (required) node of 501 Movement ICD/Dx field associated with POA field
+9 ; DGPIECE - (required) piece of 501 Movement ICD/Dx field associated with POA field
+10 ;
+11 ; Output:
+12 ; DGRSLT - (function value)
+13 ; 1 if user input permitted
+14 ; 0 if user input not permitted and output from EN^DDIOL
+15 ;
+16 NEW DGMSG
+17 NEW DGRSLT
+18 ;
+19 SET DGRSLT=0
+20 ;
+21 ;check for required input
+22 if '$DATA(DGX)
QUIT DGRSLT
+23 if '$GET(DGDA1)
QUIT DGRSLT
+24 if '$GET(DGDA)
QUIT DGRSLT
+25 if $GET(DGNODE)']""
QUIT DGRSLT
+26 if '$GET(DGPIECE)
QUIT DGRSLT
+27 ;
+28 SET DGRSLT=1
+29 ;
+30 ;check for 501 Movement ICD/Diagnosis field associated with POA indicator
+31 IF $PIECE($GET(^DGPT(DGDA1,"M",DGDA,DGNODE)),U,DGPIECE)=""
Begin DoDot:1
+32 SET DGRSLT=0
+33 SET DGMSG(1)=" "
+34 SET DGMSG(2)="Please enter the ICD for this POA first!"
+35 SET DGMSG(2,"F")="!?3"
+36 SET DGMSG(3)=" "
+37 DO EN^DDIOL(.DGMSG)
End DoDot:1
+38 ;
+39 QUIT DGRSLT
+40 ;
+41 ;
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
+2 ;entered is populated. If it is not, the user will not be allowed to enter the POA indicator.
+3 ;
+4 ; Input:
+5 ; DGX - (required) user input for field
+6 ; DGDA - (required) ien of record in PTF (#45) file
+7 ; DGNODE - (required) node of 701 Primary/Secondary Dx field associated with POA field
+8 ; DGPIECE - (required) piece of 701 Primary/Secondary Dx field associated with POA field
+9 ;
+10 ; Output:
+11 ; DGRSLT - (function value)
+12 ; 1 if user input permitted
+13 ; 0 if user input not permitted and output from EN^DDIOL
+14 ;
+15 NEW DGMSG
+16 NEW DGRSLT
+17 ;
+18 SET DGRSLT=0
+19 ;
+20 ;check for required input
+21 if '$DATA(DGX)
QUIT DGRSLT
+22 if '$GET(DGDA)
QUIT DGRSLT
+23 if $GET(DGNODE)']""
QUIT DGRSLT
+24 if '$GET(DGPIECE)
QUIT DGRSLT
+25 ;
+26 SET DGRSLT=1
+27 ;
+28 ;check for 701 Primary/Secondary Dx field associated with POA indicator
+29 IF $PIECE($GET(^DGPT(DGDA,DGNODE)),U,DGPIECE)=""
Begin DoDot:1
+30 SET DGRSLT=0
+31 SET DGMSG(1)=" "
+32 SET DGMSG(2)="Please enter the Diagnosis for this POA first!"
+33 SET DGMSG(2,"F")="!?3"
+34 SET DGMSG(3)=" "
+35 DO EN^DDIOL(.DGMSG)
End DoDot:1
+36 ;
+37 QUIT DGRSLT