1 | NURCAS2 ;HIRMFO/MD,FT-UTILITY($J) ARRAY BUILDER FOR ASSIGNMENT SHEET ;6/26/97 14:42
|
---|
2 | ;;4.0;NURSING SERVICE;**2,24**;Apr 25, 1997
|
---|
3 | I "Pp"[NUREDB D PAT
|
---|
4 | I "Uu"[NUREDB D KVAR^VADPT F DFN=0:0 S DFN=$O(^NURSF(214,"AF","A",NURWARD,DFN)) Q:DFN'>0 W:$E(IOST)="C" "." D 1^VADPT D ALLPAT
|
---|
5 | I "Ss"[NUREDB F DFN=0:0 S DFN=$O(^NURSF(214,"AF","A",NURWARD,DFN)) Q:DFN'>0 D 1^VADPT W:$E(IOST)="C" "." I VADM(1)'="" D SELECT
|
---|
6 | Q
|
---|
7 | SELECT S NROOM="" F S NROOM=$O(NRMBD(NROOM)) Q:NROOM="" I $P($P(VAIN(5),U),"-",1,2)=NROOM D SELECT1
|
---|
8 | Q
|
---|
9 | SELECT1 S NBED=$S('($P(VAIN(5),"-",2)=""):$P(VAIN(5),"-",2),1:" BLANK"),NAME=$P(VADM(1),"^"),^TMP($J,"NURCEN",NROOM,NBED,NAME)=DFN_"^"_VA("PID")_"^"_$P(VAIN(7),"^",2)
|
---|
10 | Q
|
---|
11 | ALLPAT I '(VADM(1)="") S NAME=VADM(1),NROOM=$S('($P(VAIN(5),"-")=""):$P(VAIN(5),"-"),1:" BLANK"),NBED=$S('($P(VAIN(5),"-",2)=""):$P(VAIN(5),"-",2),1:" BLANK"),^TMP($J,"NURCEN",NROOM,NBED,NAME)=DFN_"^"_VA("PID")_"^"_$P(VAIN(7),"^",2)
|
---|
12 | Q
|
---|
13 | PAT D 1^VADPT I '(VADM(1)="") S NAME=VADM(1),NROOM=$S('($P(VAIN(5),"-")=""):$P(VAIN(5),"-"),1:" BLANK"),NBED=$S('($P(VAIN(5),"-",2)=""):$P(VAIN(5),"-",2),1:" BLANK"),^TMP($J,"NURCEN",NROOM,NBED,NAME)=DFN_"^"_VA("PID")_"^"_$P(VAIN(7),"^",2)
|
---|
14 | S NPWARD=$P($G(^NURSF(214,+DFN,0)),U,3) D EN6^NURSAUTL
|
---|
15 | Q
|
---|