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

DVBAUTL6.m

Go to the documentation of this file.
  1. DVBAUTL6 ;ALB/JLU;UTILITY ROUTINE;9/15/94
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. ;
  1. DSCIFN(A) ;returns the IFN of the discarge type in A. from file 405.2
  1. ;
  1. N DIC,X
  1. S DIC="^DG(405.2,",DIC(0)="XMZ"
  1. S X=A
  1. D ^DIC
  1. Q +Y
  1. ;
  1. DSCTIEN(A) ;returns the IEN of the discharge type in file 405.3
  1. N DIC,X
  1. S DIC="^DG(405.3,",DIC(0)="XMZ"
  1. S X=A
  1. D ^DIC
  1. Q +Y
  1. ;
  1. CHECK(A) ;used in the lookup screen of the discharge report to check for
  1. ;active facility movement types for the particular MAS movement types.
  1. ;A is the MAS movement type
  1. ;
  1. N DVBA,DVBFOUND
  1. S DVBA=""
  1. F S DVBA=$O(^DG(405.1,"AM",A,DVBA)) Q:'DVBA!($D(DVBFOUND)) DO
  1. .I '$D(^DG(405.1,DVBA,0)) Q
  1. .I $P(^DG(405.1,DVBA,0),U,4)=1 S DVBFOUND=1
  1. .Q
  1. I $D(DVBFOUND) Q 1
  1. E Q 0
  1. ;
  1. LOCK(Y) ;locks the record.
  1. ;called by dvbaren1, dvbarl21, dvbareg1
  1. L +^DVB(396,+Y):2
  1. I '$T DO Q 0
  1. .S VAR(1,0)="1,0,0,2,0^Record is currently in use!"
  1. .D WR^DVBAUTL4("VAR")
  1. .K VAR
  1. .D PAUSE^DVBCUTL4
  1. Q 1
  1. ;
  1. UNLOCK(Y) ;unlocks the global
  1. ;called by dvbaren1, dvbarl21, dvbareg1
  1. L -^DVB(396,+Y)
  1. Q
  1. ;
  1. ERR(A) ;displays an error message to the user called from DVBAREG1
  1. N VAR
  1. S VAR(1,0)="1,0,0,2:2,0^There is no Admission or Non Admission information"_$S(A>0:" for this date range!",1:".")
  1. D WR^DVBAUTL4("VAR")
  1. K VAR
  1. D CONTMES^DVBCUTL4
  1. Q
  1. ;