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

BDMFDIC.m

Go to the documentation of this file.
BDMFDIC ; IHS/CMI/LAB - FILEMAN INTERFACE UTILITY ; [ 02/02/2009 10:33 AM ]
 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
 ;;UTILITY ROUTINE USED TO MANAGE ALL INTERFACE TO FILEMAN
 ;;WITH FEW EXCEPTIONS, THIS IS THE ONLY PLACE IN ARMS FROM WHICH
 ;;FILEMAN ENTRY POINTS ARE CALLED
DIC ;EP;
 Q:$D(BDMOUT)
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D ^DIC
 S:$D(DUOUT) BDMQUIT=""
 S:$D(DTOUT)!(X="^^") (BDMQUIT,BDMOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO,DIADD
 Q
MIX ;EP;
 Q:$D(BDMOUT)
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D MIX^DIC1
 S:$D(DTOUT)!$D(DUOUT)!(X="^^") (BDMQUIT,BDMOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO
 Q
IX ;EP;
 Q:$D(BDMOUT)
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D IX^DIC
 S:$D(DTOUT)!$D(DUOUT)!(X="^^") (BDMQUIT,BDMOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO
 Q
DIE ;EP;
 Q:$D(BDMOUT)
 Q:'DA
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 L +@(DIE_DA_")"):4 I '$T S BDMQUIT="" Q:'$D(IOST)#2  W:$E(IOST,1,2)="C-" !!,"Entry being edited by another user.  Please try Later.",! H 3 Q
 S BDMDIEDA=DA
 D ^DIE
 L -@(DIE_BDMDIEDA_")"):0
 I $D(DTOUT)!$D(DUOUT) S (BDMQUIT,BDMOUT)=""
 K DIE,DA,DR,BDMDIEDA
 Q
DDS ;EP;FOR SCREENMAN CALLS
 S DDSFILE=DIE
 D ^DDS
 K DDSFILE,BDMSCREN
 Q
FILE ;EP;
 K DD,DO,DTOUT,DUOUT,BDMQUIT,BDMOUT
 D FILE^DICN
 S:$D(DTOUT)!$D(DUOUT)!(X="^^") (BDMQUIT,BDMOUT)=""
 K DIC,DA,DD,DR,DINUM,DLAYGO
 Q
DIR ;EP;
 I $D(BDMOUT) K DIR S Y="" Q
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D ^DIR
 S BDMY=Y
 S:$D(DIRUT)!$D(DIROUT)!$D(DUOUT) BDMQUIT=""
 S:X="^^"!$D(DTOUT) (BDMQUIT,BDMOUT)=""
 K DIR,DIRUT,DIROUT,DUOUT,DTOUT
 Q
DIK ;EP;
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D ^DIK
 K DIK
 Q
IX1 ;EP;
 Q:$D(BDMOUT)
 K DTOUT,DUOUT,BDMQUIT,BDMOUT
 D IX1^DIK
 K DIK,DA
 Q
DIQ1 ;EP;
 D EN^DIQ1
 K DIC,DA,DR,DIQ
 Q
WP ;EP;TO BROWSE WORD PROCESSING FIELD
 Q:'$D(BDMFILE)#2!'$D(BDMIEN)#2!'$D(BDMFIELD)
 K BDMSCREN
 D WP^DDBR(BDMFILE,BDMIEN,BDMFIELD,"N",$G(BDMTITLE))
 Q
DICS() ;EP TO SET DIC("S") FOR CAN LOOKUP FOR SUPPLIES/SERVICES
 S DIC("S")="Q:'$G(BDMLBDA)!'$G(BDMDOCDA)  I $D(^BDMLOCB(""DCAN"",+Y,BDMLBDA))!$D(^BDMLOCB(""OCAN"",+Y,BDMLBDA))!($P($G(^BDMDOC(BDMDOCDA,0)),U,4)=36!($P($G(^(0)),U,4)=37)&($D(^BDMLOCB(""DCAN"",+Y))))"
 Q DIC("S")
QUIT() ;EP;TO CHECK FOR PROGRAM QUIT AND OUT CONTROL VARIABLES
 I $D(BDMQUIT)!$D(BDMOUT)
 Q $T