source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURAAU5.m@ 949

Last change on this file since 949 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1NURAAU5 ;HIRMFO/FT-Check if every MAS Ward has a Nursing Location ;1/7/97 11:41
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ;
4EN1 ; called from NURAAU0 - the Nursing Acuity option
5 ; sends a mail message to G.NURS-ADP group if MAS Ward does not have
6 ; a corresponding Nursing Location.
7 K NURSTEXT
8 S NURSTEXT(1)="The following MAS Wards do not have corresponding NURSING Locations."
9 S NURSTEXT(2)="Use the 'Nursing Location File, Edit' option to correct this problem."
10 S NURSTEXT(3)=" "
11 S NURSLINE=3
12 F NURSY=0:0 S NURSY=$O(^DIC(42,NURSY)) Q:NURSY'>0 S X=$P(^DIC(42,NURSY,0),"^",1) D MATCHUP
13 I NURSLINE>3 D MAIL
14 K NURSBAD,NURSLINE,NURSTEXT,NURSX,NURSY,NURSZLOC
15 K X,XMDUZ,XMSUB,XMTEXT,XMY
16 Q
17MATCHUP ; matchup MAS Wards and Nursing Locations
18 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
19 K NURSX,NURSZLOC
20 I NURSBAD S NURSLINE=NURSLINE+1,NURSTEXT(NURSLINE)=X
21 Q
22MAIL ; send a mail message listing MAS Wards without Nursing Locations to
23 ; Nursing mail group
24 S XMY("G.NURS-ADP")=""
25 S XMDUZ=.5
26 S XMTEXT="NURSTEXT("
27 S XMSUB="MAS Wards with no Nursing Locations"
28 S XMDUN="Nursing Acuity Option"
29 D ^XMD
30 Q
Note: See TracBrowser for help on using the repository browser.