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

NURAAU5.m

Go to the documentation of this file.
  1. NURAAU5 ;HIRMFO/FT-Check if every MAS Ward has a Nursing Location ;1/7/97 11:41
  1. ;;4.0;NURSING SERVICE;;Apr 25, 1997
  1. ;
  1. EN1 ; called from NURAAU0 - the Nursing Acuity option
  1. ; sends a mail message to G.NURS-ADP group if MAS Ward does not have
  1. ; a corresponding Nursing Location.
  1. K NURSTEXT
  1. S NURSTEXT(1)="The following MAS Wards do not have corresponding NURSING Locations."
  1. S NURSTEXT(2)="Use the 'Nursing Location File, Edit' option to correct this problem."
  1. S NURSTEXT(3)=" "
  1. S NURSLINE=3
  1. F NURSY=0:0 S NURSY=$O(^DIC(42,NURSY)) Q:NURSY'>0 S X=$P(^DIC(42,NURSY,0),"^",1) D MATCHUP
  1. I NURSLINE>3 D MAIL
  1. K NURSBAD,NURSLINE,NURSTEXT,NURSX,NURSY,NURSZLOC
  1. K X,XMDUZ,XMSUB,XMTEXT,XMY
  1. Q
  1. MATCHUP ; matchup MAS Wards and Nursing Locations
  1. 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
  1. K NURSX,NURSZLOC
  1. I NURSBAD S NURSLINE=NURSLINE+1,NURSTEXT(NURSLINE)=X
  1. Q
  1. MAIL ; send a mail message listing MAS Wards without Nursing Locations to
  1. ; Nursing mail group
  1. S XMY("G.NURS-ADP")=""
  1. S XMDUZ=.5
  1. S XMTEXT="NURSTEXT("
  1. S XMSUB="MAS Wards with no Nursing Locations"
  1. S XMDUN="Nursing Acuity Option"
  1. D ^XMD
  1. Q