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

TIUUTL2.m

Go to the documentation of this file.
TIUUTL2 ;AITC/CR - UTILITY FOR INPT MULTIDIVISONAL ROUTINES ;10/18/17 9:29am
 ;;1.0;TEXT INTEGRATION UTILITIES;**305**;JUN 20, 1997;Build 27
 ;
 ; Reference to ^DIC(42 - supported by ICR #10039
 ;
CNTDIV()   ;COUNT THE NUMBER OF DIVISIONS PRESENT FOR WARD LOCATIONS
 N TIUWARD,TIUDIV,TIUDIVCT,TIUDIVARR
 S TIUWARD=0 F  S TIUWARD=$O(^DIC(42,TIUWARD)) Q:'+TIUWARD  D
 . Q:$P($G(^DIC(42,TIUWARD,"OOS",1,0)),U)'=""  ; skip over inactive wards
 . S TIUDIV=$P($G(^DIC(42,TIUWARD,0)),U,11)
 . I +TIUDIV S TIUDIVARR(TIUDIV)=""
 S (TIUDIV,TIUDIVCT)=0 F  S TIUDIV=$O(TIUDIVARR(TIUDIV)) Q:'+TIUDIV  D
 . S TIUDIVCT=TIUDIVCT+1
 Q TIUDIVCT