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

DGPMDD.m

Go to the documentation of this file.
  1. DGPMDD ;ALB/MRL - FILE 405 DD CALLS; 27 JAN 89] ; 6/27/07 11:05am
  1. ;;5.3;Registration;**41,129,755**;Aug 13, 1993;Build 3
  1. ID ;Display Identifiers
  1. N DGPMDISP
  1. S DGPMDD(1)=$S($D(^DPT(+$P(DGPMDD,"^",3),0)):^(0),1:"")
  1. S DGPMDISP(1)=$P(DGPMDD(1),"^")_" ("_$P(DGPMDD(1),"^",9)_")"
  1. S DGPMDISP(1,"F")="?30"
  1. S DGPMDISP(2)=$S($D(^DG(405.3,+$P(DGPMDD,"^",2),0)):$P(^(0),"^"),1:"TRANSACTION UNKNOWN")_": "
  1. S DGPMDISP(2)=DGPMDISP(2)_$S($D(^DG(405.1,+$P(DGPMDD,"^",4),0)):$P(^(0),"^"),1:"UNKNOWN MOVEMENT TYPE")
  1. S DGPMDISP(2,"F")="!?15"
  1. D EN^DDIOL(.DGPMDISP)
  1. K DGPMDD
  1. Q
  1. ;
  1. SCREEN(Y,DA,DGDT) ;screen called from various files/fields - select active providers in file 200
  1. ;File 405 - Patient Movement:
  1. ; Field .08 - Primary Care Physician
  1. ; Field .19 - Attending Physician
  1. ;File 2 - Patient:
  1. ; Field .104 - Provider
  1. ; Field .1041 - Attending Physician
  1. ;File 41.1 - Scheduled Admission:
  1. ; Field 5 - Provider
  1. ;File 45 - PTF, Subfile 45.02 (Field 50) - 501:
  1. ; Subfield 24 - Provider
  1. ;File 45.7 - Facility Treating Speciality, Subfile 45.701 (Field 10):
  1. ; Subfield .01 - Providers
  1. ;INPUT: Y=ien if file 200
  1. ; DA=record edited
  1. ; DGDT=date, either today's or date of movement
  1. ;date of movement is used for fields .19 (attending) & .08 (primary) in file 405.
  1. ;OUTPUT: 1 to select; 0 to not select
  1. ;
  1. ; begin patch *755*
  1. ; DBIA #2349 - ACTIVE PROVIDER will be used for validation.
  1. ; The INACTIVE DATE (#53.4) field will no longer be used.
  1. ; New Input selection logic...
  1. ; If input selection has the PROVIDER security key...
  1. ; the TERMINATION DATE (#9.2) and the PERSON CLASS (#8932.1) fields
  1. ; will be used to determine if selection is active in the
  1. ; NEW PERSON (#200) file for a given date.
  1. ;
  1. ;S:'+$G(DA) DA=0 S:'+$G(DGDT) DGDT=DT I '+$G(Y) Q 0
  1. ;N DGINACT,DGY S DGY=0,DGDT=$P(DGDT,".")
  1. ;I $D(^VA(200,"AK.PROVIDER",$P($G(^VA(200,+Y,0)),U),+Y)) D
  1. ;.S DGY=0,DGINACT=$G(^VA(200,+Y,"PS"))
  1. ;.S DGY=$S(DGINACT']"":1,'+$P(DGINACT,U,4):1,DGDT'>+$P(DGINACT,U,4):1,1:0)
  1. ;
  1. N DGY S DGY=0
  1. I +$G(Y) D
  1. . S:'+$G(DA) DA=0 S:'+$G(DGDT) DGDT=DT S DGDT=$P(DGDT,".")
  1. . I $D(^VA(200,"AK.PROVIDER",$P($G(^VA(200,+Y,0)),U),+Y)) D
  1. . . I $$ACTIVPRV^PXAPI(+Y,DGDT) S DGY=1 ;DBIA #2349
  1. ; end patch *755*
  1. Q DGY
  1. ;
  1. HELP(DA,DGDT) ;executable help called from various files/fields - display active providers in file 200
  1. ;File 405 - Patient Movement:
  1. ; Field .08 - Primary Care Physician
  1. ; Field .19 - Attending Physician
  1. ;File 2 - Patient:
  1. ; Field .104 - Provider
  1. ; Field .1041 - Attending Physician
  1. ;File 41.1 - Scheduled Admission:
  1. ; Field 5 - Provider
  1. ;File 45 - PTF, Subfile 45.02 (Field 50) - 501:
  1. ; Subfield 24 - Provider
  1. ;File 45.7 - Facility Treating Speciality, Subfile 45.701 (Field 10):
  1. ; Subfield .01 - Providers
  1. ;INPUT: DA=record edited
  1. ; DGDT=date, either today's or date of movement
  1. ;date of movement is used for fields .08 (attending) & .19 (primary) in file 405.
  1. S:'+$G(DGDT) DGDT=DT I '+$G(DA) Q
  1. ;OUTPUT: display of active providers
  1. N D,DGINACT,DO,DIC,X
  1. S X="??",DIC="^VA(200,",DIC(0)="EQ",D="AK.PROVIDER"
  1. S DIC("S")="I $$SCREEN^DGPMDD(Y,DA,DGDT)"
  1. D IX^DIC
  1. Q