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

IBDFN16.m

Go to the documentation of this file.
  1. IBDFN16 ;ALB/DHH - ENCOUNTER FORM - (entry points for gaf project) ;3/20/2001
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;**37**;APR 24, 1997
  1. ;
  1. GAFPROV ;Enter GAF Score Provider
  1. ;
  1. ; -- @IBARY should be defined
  1. ;
  1. N DIC,Y,DIROUT,DIRUT,DTOUT,DUOUT
  1. S DIC=200,DIC(0)="AEQM"
  1. S DIC("S")="I $$OKPROV^IBDFDE23(Y)"
  1. S DIC("A")="Provider determining GAF Score: " D ^DIC K DIC
  1. I $D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT)) Q
  1. I Y<0 Q
  1. S @IBARY=Y
  1. Q
  1. ;
  1. OKPROV(IEN) ; Screen for provider lookup using person class
  1. ; provider for gaf must have the sd gaf score security key
  1. ;
  1. Q ($D(^XUSEC("SD GAF SCORE",IEN)))
  1. ;
  1. GAFRET ;Previous GAF information returned from Mental Health
  1. ;
  1. ; -- this is to be used by PREVIOUS GAF SCORE package interface
  1. ;
  1. N GAFDAT,Y,GAFPROV,X,X1,X2,IBX
  1. S IBX=$$RET^YSGAF($G(DFN))
  1. I +IBX=-1 S @IBARY="" Q
  1. S GAFDAT=$P(IBX,"^",2)
  1. S Y=GAFDAT K %DT D DD^%DT S $P(IBX,"^",2)=$P(Y,"@")
  1. S GAFPROV=$P($G(^VA(200,+$P(IBX,"^",3),0)),"^")
  1. S $P(IBX,"^",3)=GAFPROV
  1. S $P(IBX,"^",4)=$$RULE(GAFDAT)
  1. S @IBARY=IBX
  1. Q
  1. RULE(GAFDAT) ;check for greater than 90 days
  1. ;
  1. ; -- gafdat is the internal date of the last gaf score
  1. ;
  1. N RULE
  1. S RULE="NO"
  1. S X1=DT,X2=GAFDAT D ^%DTC
  1. S:X>90 RULE="YES"
  1. Q RULE