source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURAAE1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1NURAAE1 ;HIRMFO/RM-EDIT ACUITY TOTALS...AMIS A1106-cont. ;AUG 1986
2 ;;4.0;NURSING SERVICE;**14**;Apr 25, 1997
3EN1 ; CHECK IF THE NODE SELECTED IS VALID AND EXISTS: ENTERED FROM NURAAE0
4 S NOSW=0,NURX=RPTDATE_NURSHFT_WARD S DA(1)=$S($D(^NURSA(213.4,"B",NURX)):$O(^NURSA(213.4,"B",NURX,0)),1:($P(^NURSA(213.4,0),U,3)+1)) I $D(^NURSA(213.4,DA(1),1,"B",BEDSECT)) Q
5ADDDAY ;
6 W $C(7),!,"THIS COMBINATION YOU HAVE SELECTED DOES NOT EXIST,",!,"WOULD YOU LIKE TO ADD THIS AS NEW DATA" S %=1 D YN^DICN
7 I (%=-1)!(%=2) S:%=-1 OUTSW=1 S:%=2 NOSW=1 Q
8 I %=0 W !,"ANSWER YES OR NO" G ADDDAY
9 D ADDNODE
10 Q
11ADDNODE ; ADD RECORD TO ACUITY SUB-FILE
12 I $D(^NURSA(213.4,DA(1),0)) G ADDACU
13 N NURZERO S NURZERO=$P($G(^NURSA(213.4,0)),"^",3,4),DA(1)=$P(NURZERO,"^")
14LOCK S DA(1)=DA(1)+1 L +^NURSA(213.4,DA(1)):0 I '$T!$D(^NURSA(213.4,DA(1))) L -^NURSA(213.4,DA(1)) G LOCK
15 S $P(^NURSA(213.4,0),"^",3,4)=DA(1)_"^"_($P(NURZERO,"^",2)+1),X=RPTDATE_NURSHFT_WARD,^NURSA(213.4,DA(1),0)=X
16 S DA=DA(1),DIK="^NURSA(213.4," D IX1^DIK K DIK
17ADDACU S:'$D(^NURSA(213.4,DA(1),1,0)) ^(0)="^213.41PA^^"
18 S DA=+$P(^NURSA(213.4,DA(1),1,0),"^",3)
19ADD S DA=DA+1 I $D(^NURSA(213.4,DA(1),1,DA,0)) G ADD
20 S $P(^NURSA(213.4,DA(1),1,0),"^",3)=DA,$P(^(0),"^",4)=$P(^(0),"^",4)+1,^NURSA(213.4,DA(1),1,DA,0)=BEDSECT_"^0^0^0^0^0"
21 S DIK="^NURSA(213.4,DA(1),1," D IX1^DIK K DIK
22 L -^NURSA(213.4,DA(1),0)
23 Q
Note: See TracBrowser for help on using the repository browser.