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

ANSDIC.m

Go to the documentation of this file.
ANSDIC ;IHS/OIRM/DSD/CSC - FILEMAN INTERFACE UTILITY; [ 02/25/98  10:32 AM ]
 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
 ;;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(ANSOUT)
 K DTOUT,DUOUT,ANSQUIT,ANSOUT
 D ^DIC
 S:$D(DUOUT) ANSQUIT=""
 S:$D(DTOUT)!(X="^^") (ANSQUIT,ANSOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO
 Q
MIX ;EP;
 Q:$D(ANSOUT)
 K DTOUT,DUOUT,ANSQUIT,ANSOUT
 D MIX^DIC1
 S:$D(DTOUT)!$D(DUOUT)!(X="^^") (ANSQUIT,ANSOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO
 Q
IX ;EP;
 Q:$D(ANSOUT)
 K DTOUT,DUOUT,ANSQUIT,ANSOUT
 D IX^DIC
 S:$D(DTOUT)!$D(DUOUT)!(X="^^") (ANSQUIT,ANSOUT)=""
 K DIC,DA,DD,DR,DINUM,D,DLAYGO
 Q
DIE ;EP;
 Q:$D(ANSOUT)
 Q:'DA
 K DTOUT,DUOUT,ANSQUIT,ANSOUT
 L +@(DIE_DA_")"):4 I '$T S ANSQUIT="" Q:'$D(IOST)#2  W:$E(IOST,1,2)="C-" !!,"Entry being edited by another user.  Please try Later.",! H 3 Q
 S ANSDIEDA=DA
 D ^DIE
 L -@(DIE_ANSDIEDA_")"):0
 I $D(DTOUT)!$D(DUOUT) S (ANSQUIT,ANSOUT)=""
 K DIE,DA,DR,ANSDIEDA
 Q
FILE ;E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