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

NURSAWCK.m

Go to the documentation of this file.
NURSAWCK ;HIRMFO/RM-CHECK SO EVERY MAS WARD HAS A NURSING LOCATION ;AUGUST 1986
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; CALLED BY ROUTINE NURSCPL & NURSCPLU, RETURNS NURSBAD (1 if MAS Ward has no
 ; Nursing equivalent, 0 if it does.), and BADWARD("MAS Ward") for
 ; the ward in question.
 S NURSX=$O(^DIC(42,"B",X,"")),NURSBAD=1 I NURSX'="" F NURSZLOC=0:0 S NURSZLOC=$O(^NURSF(211.4,"C",NURSX,NURSZLOC)) Q:NURSZLOC'>0  I $S('$D(^NURSF(211.4,NURSZLOC,"I")):1,$P(^("I"),"^")="A":1,1:0) S NURSBAD=0
 K NURSX,NURSZLOC I NURSBAD S BADWARD(X)=""
 Q
BADWARD ; ERROR MESSAGE IF THERE IS AN INVALID WARD
 W $C(7),!!!,"The following MAS Wards do not have corresponding NURSING Locations: "
 S NURSWR42="" F NURSZ=0:0 S NURSWR42=$O(BADWARD(NURSWR42)) Q:NURSWR42=""  W !,?20,NURSWR42
 K NURSWR42,NURSZ
 Q