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

BHSDEN.m

Go to the documentation of this file.
BHSDEN ;IHS/CIA/MGH - Health Summary for Dental ;17-Mar-2006 10:36;MGH
 ;;1.0;HEALTH SUMMARY COMPONENTS;;March 17, 2006
 ;===================================================================
 ;Taken from ADERVW
 ;IHS/HQT/MJL - DENTAL CHART REVW PART 1 ;  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 ;VA health sumary routine for dental data
START ; EP
 N ADEPCC,ADEADA,ADEBRK,ADEC,ADECAT,ADECKP,ADECVD,ADEDAT,ADEDFN,ADEDLM,ADEDLT,ADEDTD,ADEDTU,ADEF,ADEFLG,ADEFO,ADEHD2,ADEHDR,ADEICL,ADEILN
 N ADEMDFN,ADENDM,ADENDN,ADENFLG,ADENOD,ADENRQ,ADENSH,ADEOP,ADEPG,ADEPRT,ADEQ,ADER,ADESFC,ADESFN,ADESITE,ADESITX,ADESUB,ADESUBD,ADESVD
 N ADETXT,ADETYP,ADETYPN,ADEX,ADEY,X,Y,%
 N ADECNT,ADEDES,ADEJ,ADENOT,ADEPC,ADEPRV,ADEREP,ADEV,ADENDMS
 S ADEPCC=1
 D INIT
 ;------->LIST FOLLOWUP, FAILED APPTS
 D DO^BHSDEN2
 ;------->LIST DENTAL PROCEDURES
 D DO^BHSDEN1
 ;------->CALL TURNAROUND FORM FROM HERE
 D:$D(ADETUR) DO^BHSDTUR
 ;------->RETURN TO CALLING ROUTINE
END ;EP
 D CKP^GMTSUP Q:$D(GMTSQIT)
KILL I 'ADEPCC D ^%ZISC K BHSQIT,BHSNPG
 K ADEADA,ADEBRK,ADEC,ADECAT,ADECKP,ADECVD,ADEDAT,ADEDFN,ADEDLM,ADEDLT,ADEDTD,ADEDTU,ADEF,ADEFLG,ADEFO,ADEHD2,ADEHDR,ADEICL,ADEILN
 K ADEMDFN,ADENDM,ADENDN,ADENOD,ADENRQ,ADENSH,ADEOP,ADEPG,ADEPRT,ADEQ,ADER,ADESFC,ADESFN,ADESITE,ADESITX,ADESUB,ADESUBD,ADESVD
 K ADETXT,ADETYP,ADETYPN,ADEX,ADEY,ADELAST
 K ADECNT,ADEDES,ADEJ,ADENOT,ADEPC,ADEPRV,ADEREP,ADEV,ADENDMS
 K ADEPCC,ADETUR,ADEZ
 Q
 ;
INIT I '$D(ADEPCC) S Y=0 Q
 G:'ADEPCC I2
 ;
 S ADEPAT=BHSPAT
 S ADEDLM=GMTSDLM,ADENDM=GMTSNDM
 S ADEPRT="D PRTTXT^BHSDEN0"
 S ADESITX="D GETSITE^BHSDEN0"
 S Y=1
 Q
I2 ;EP
 S ADEPG=0
 S %="CONFIDENTIAL PATIENT DATA",$P(ADEHDR,"*",(IOM-$L(%)/2))=%,$P(ADEHDR,"*",IOM-$L(%))=""
 S ADEPRT="D PRTTXT^BHSDEN0"
 S ADESITX="D GETSITE^BHSDEN0"
 I $P(IOST,"-")="C" S ADECKP=ADECKP_"W *7,""<>"" R X:DTIME S:'$T X=U W *13 S:X[U BHSQIT="""" I '$D(BHSQIT) "
 S ADECKP=ADECKP_"W @IOF D HEADER^BHSDEN0 S GMTSNPG=1"
 I $D(DUZ(2)),DUZ(2),$D(^ADEPARAM(DUZ(2),0)) S ADEDLM=$P(^ADEPARAM(DUZ(2),0),U,9) S ADEDLM=$S(ADEDLM["D":ADEDLM,ADEDLM["M":ADEDLM*30,ADEDLM["Y":ADEDLM*365,1:5*365)
 S:'$D(ADEDLM) ADEDLM=5*365
 S X1=DT,X2=-ADEDLM D C^%DTC S ADEDLM=9999999-X K X1,X2
 S:$D(ADELAST) ADENDM=1
 I '$D(ADENDM),$D(DUZ(2)),DUZ(2),$D(^ADEPARAM(DUZ(2),0)) S ADENDM=$P(^ADEPARAM(DUZ(2),0),U,8) S:'ADENDM ADENDM=10
 S:'$D(ADENDM) ADENDM=10
 S ADECVD="S:Y]"""" Y=+Y,Y=$E(Y,4,5)_""/""_$E(Y,6,7)_""/""_$E(Y,2,3)"
 U IO W @IOF D HEADER^BHSDEN0 S GMTSNPG=1
 S Y=1 Q
QUE N ZTRTN,ZTDESC,ZTSAVE
 S ZTRTN="START^BHSDEN",ZTDESC="DENTAL PATIENT INQUIRE",ZTSAVE("ADEPAT")="",ZTSAVE("ADEPCC")="" D ^%ZTLOAD Q
 ;