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

ADEPQA1C.m

Go to the documentation of this file.
ADEPQA1C ; IHS/HQT/MJL - SCREENS ;  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 ;
DATSCN(ADENOD) ;EP
 ;
 N ADEBEG,ADEND,ADEDAT
 S ADEBEG=$P(ADEDATE,U,2)
 S ADEND=$P(ADEDATE,U,3)
 S ADEDAT=$P(ADENOD,U,2)
 I ADEDAT'<ADEBEG&(ADEDAT'>ADEND) Q 1
 Q 0
 ;
AGESCN(ADENOD) ;EP - Returns 1 if patient age in range set in ADEAGE
 ;Requires variable ADEAGE
 N ADELO,ADEHI,ADEYRS,%DT
 S ADELO=$P(ADEAGE,U,2)
 S ADEHI=$P(ADEAGE,U,3)
 S X1=$P(ADENOD,U,2)
 S X2=$P(ADENOD,U)
 Q:'$D(^DPT(X2,0)) 0
 S X2=$P(^DPT(X2,0),U,3)
 Q:X2="" 0
 S %DT="" D D^%DTC
 ;beginning Y2K fix
 ;S ADEYRS=X\364.25
 S ADEYRS=X\365.25  ;Y2000
 ;end Y2K fix block
 Q:ADEYRS<ADELO!(ADEYRS>ADEHI) 0
 Q 1
 K ADEYRS,ADELO,ADEHI ;*NE
 ;
LOCSCN(ADENOD) ;EP - Returns 1 if ADEDFN at one of the locations in ADELOC
 N ADEFLG,ADEFAC,ADEJ
 S ADEFLG=0
 S ADEFAC=$P(ADELOC,"^",2)
 Q:ADEFAC="" 0
 F ADEJ=1:1:$L(ADEFAC,",") I $P(ADEFAC,",",ADEJ)=$P(ADENOD,U,3) S ADEFLG=1 Q
 Q ADEFLG
 ;
PRVSCN(ADENOD) ;EP - Returns 1 if ADEDFN has one of the dentists in ADEPROV
 N ADEFLG,ADEPRV,ADEJ
 S ADEFLG=0
 S ADEPRV=$P(ADEPROV,"^",2)
 Q:ADEPRV="" 0
 F ADEJ=1:1:$L(ADEPRV,",") I $P(ADEPRV,",",ADEJ)=$P(ADENOD,U,4) S ADEFLG=1 Q
 Q ADEFLG
 ;
HYGSCN(ADENOD) ;EP Returns 1 if ADEDFN has one of the hygienists in ADEHYG
 N ADEFLG,ADEPRV,ADEJ
 S ADEFLG=0
 S ADEPRV=$P(ADEHYG,"^",2)
 Q:ADEPRV="" 0
 F ADEJ=1:1:$L(ADEPRV,",") I $P(ADEPRV,",",ADEJ)=$P(ADENOD,U,5) S ADEFLG=1 Q
 Q ADEFLG
 ;