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

AMHDPP.m

Go to the documentation of this file.
AMHDPP ; IHS/CMI/LAB - DISPLAY PATIENT PROFILE (HEALTH SUMMARY) ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
 ;
 ;
EN ;EP
 N DIC,DA,D0,X,Y
 I $G(AMHPAT)="" W !!,$C(7),$C(7),"Sorry I don't know the patient.",! Q
 D GETTYPE
 G:$G(APCHSTYP)="" XIT
 I $G(IO)="" S IOP="HOME" D ^%ZIS
 S APCHSPAT=AMHPAT
 S %="PCC Health Summary for "_$P(^DPT(APCHSPAT,0),U)
 D VIEWR^XBLM("EN^APCHS",%)
 K APCHSPAT,APCHSTYP,APCHSTAT,APCHSMTY,AMCHDAYS,AMCHDOB,%
 Q
XIT ;
 K %,Y,D0,X
 K APCHSPAT,APCHSTYP
 K APCHSTYP,APCHSPAT
 Q
GETTYPE ;
 D GETHSTYP^AMHVRL
 Q
 ;I $G(^AMHSITE(DUZ(2),0))="" D DEFAULT Q
 ;S APCHSTYP=$P(^AMHSITE(DUZ(2),0),U,4) I APCHSTYP="" D DEFAULT Q
 ;I '$D(^APCHSCTL(APCHSTYP)) W !,"Error in Site Parameter File!",$C(7),$C(7) S APCHSTYP="" Q
 ;Q
DEFAULT ;
 S APCHSTYP=""
 S DIC(0)="AEMQL",DIC="^APCHSCTL(" D ^DIC K DIC,DA
 I Y=-1 Q
 S APCHSTYP=+Y
 Q