BMCSMHS ; IHS/PHXAO/TMJ - print face sheet ffrom screenman ;
;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
;
EN ;EP - called from screenman screen to display hs
K BMCQUIT
W:$D(IOF) @IOF
S APCHSPAT=BMCDFN
D EN^XBNEW("EN1^BMCSMHS","APCHSPAT")
D REFRESH
D XIT
Q
EN1 ;EP - called from XBNEW from EN
Q:'$G(APCHSPAT)
D GETTYP
G:'$G(APCHSTYP) XIT
D VIEWR^XBLM("EN^APCHS","PCC Health Summary for "_$P(^DPT(APCHSPAT,0),U))
Q
DIR ;call to XBDBQUE
NEW DDS,DIR0,DA,DIE
K BMCOPT
W ! S DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen",DIR("A")="Do you wish to",DIR("B")="P" K DA D ^DIR K DIR
I $D(DIRUT) S BMCQUIT="" Q
S BMCOPT=Y
Q
GETTYP ; EP - get health summary TYPE
K APCHSTYP
K DIC S DIC=9001015,DIC("A")="Select health summary type: ",DIC(0)="AEQM"
S X="" I DUZ(2),$D(^APCCCTRL(DUZ(2),0))#2 S X=$P(^(0),U,3)
I $D(^DISV(DUZ,"^APCHSCTL(")) S Y=^("^APCHSCTL(") I $D(^APCHSCTL(Y,0)) S X=$P(^(0),U,1)
S:X="" X="ADULT REGULAR"
S DIC("B")=X
D ^DIC I Y>0 S APCHSTYP=+Y
K DIC,DA
Q
XIT ;
K APCHSPAT,APCHSTYP
Q
REFRESH ;
S X=0 X ^%ZOSF("RM")
W $P(DDGLVID,DDGLDEL,8)
D REFRESH^DDSUTL
PROC ;
Q
BMCSMHS ; IHS/PHXAO/TMJ - print face sheet ffrom screenman ;
+1 ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
+2 ;
EN ;EP - called from screenman screen to display hs
+1 KILL BMCQUIT
+2 IF $DATA(IOF)
WRITE @IOF
+3 SET APCHSPAT=BMCDFN
+4 DO EN^XBNEW("EN1^BMCSMHS","APCHSPAT")
+5 DO REFRESH
+6 DO XIT
+7 QUIT
EN1 ;EP - called from XBNEW from EN
+1 IF '$GET(APCHSPAT)
QUIT
+2 DO GETTYP
+3 IF '$GET(APCHSTYP)
GOTO XIT
+4 DO VIEWR^XBLM("EN^APCHS","PCC Health Summary for "_$PIECE(^DPT(APCHSPAT,0),U))
+5 QUIT
DIR ;call to XBDBQUE
+1 NEW DDS,DIR0,DA,DIE
+2 KILL BMCOPT
+3 WRITE !
SET DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen"
SET DIR("A")="Do you wish to"
SET DIR("B")="P"
KILL DA
DO ^DIR
KILL DIR
+4 IF $DATA(DIRUT)
SET BMCQUIT=""
QUIT
+5 SET BMCOPT=Y
+6 QUIT
GETTYP ; EP - get health summary TYPE
+1 KILL APCHSTYP
+2 KILL DIC
SET DIC=9001015
SET DIC("A")="Select health summary type: "
SET DIC(0)="AEQM"
+3 SET X=""
IF DUZ(2)
IF $DATA(^APCCCTRL(DUZ(2),0))#2
SET X=$PIECE(^(0),U,3)
+4 IF $DATA(^DISV(DUZ,"^APCHSCTL("))
SET Y=^("^APCHSCTL(")
IF $DATA(^APCHSCTL(Y,0))
SET X=$PIECE(^(0),U,1)
+5 IF X=""
SET X="ADULT REGULAR"
+6 SET DIC("B")=X
+7 DO ^DIC
IF Y>0
SET APCHSTYP=+Y
+8 KILL DIC,DA
+9 QUIT
XIT ;
+1 KILL APCHSPAT,APCHSTYP
+2 QUIT
REFRESH ;
+1 SET X=0
XECUTE ^%ZOSF("RM")
+2 WRITE $PIECE(DDGLVID,DDGLDEL,8)
+3 DO REFRESH^DDSUTL
PROC ;
+1 QUIT