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

ACDVID.m

Go to the documentation of this file.
ACDVID ;IHS/ADC/EDE/KML - IDENTIFIERS FOR CDMIS VISIT FILE;
 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
 ;
START ;
 ; VALUE OF Y AND THE NAKED INDICATOR SET BY FILEMAN ROUTINE
 Q:'$G(Y)
 Q:'$D(^(0))
 S ACDVID=16 S:$X>16 ACDVID=24
 S ACDX=^(0)
 S ACDY=$P(ACDX,U,5)
 S ACDVID("PAT NAME")=$S(ACDY:$P($G(^DPT(ACDY,0)),U),1:"NO NAME")
 S ACDVID("PAT SEX")=$P(ACDX,U,12)
 S ACDY=$P(ACDX,U,2)
 S ACDVID("COMP CODE")=$S(ACDY:$P(^ACDCOMP(ACDY,0),U,2),1:"UNK")
 S ACDVID("COMP TYPE")=$P(ACDX,U,7)
 S ACDVID("TYPE CONTACT")=$P(ACDX,U,4)
 W ?ACDVID,$J(ACDVID("COMP CODE"),3)_"/"_ACDVID("COMP TYPE")_"  "_ACDVID("TYPE CONTACT")_"  "_ACDVID("PAT NAME")
 K ACDVID,ACDX,ACDY
 W @("$E("_DIC_"Y,0),0)") ; reset the naked
 Q