24 lines
1.3 KiB
Mathematica
24 lines
1.3 KiB
Mathematica
|
NURAAE1 ;HIRMFO/RM-EDIT ACUITY TOTALS...AMIS A1106-cont. ;AUG 1986
|
||
|
;;4.0;NURSING SERVICE;**14**;Apr 25, 1997
|
||
|
EN1 ; CHECK IF THE NODE SELECTED IS VALID AND EXISTS: ENTERED FROM NURAAE0
|
||
|
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
|
||
|
ADDDAY ;
|
||
|
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
|
||
|
I (%=-1)!(%=2) S:%=-1 OUTSW=1 S:%=2 NOSW=1 Q
|
||
|
I %=0 W !,"ANSWER YES OR NO" G ADDDAY
|
||
|
D ADDNODE
|
||
|
Q
|
||
|
ADDNODE ; ADD RECORD TO ACUITY SUB-FILE
|
||
|
I $D(^NURSA(213.4,DA(1),0)) G ADDACU
|
||
|
N NURZERO S NURZERO=$P($G(^NURSA(213.4,0)),"^",3,4),DA(1)=$P(NURZERO,"^")
|
||
|
LOCK 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
|
||
|
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
|
||
|
S DA=DA(1),DIK="^NURSA(213.4," D IX1^DIK K DIK
|
||
|
ADDACU S:'$D(^NURSA(213.4,DA(1),1,0)) ^(0)="^213.41PA^^"
|
||
|
S DA=+$P(^NURSA(213.4,DA(1),1,0),"^",3)
|
||
|
ADD S DA=DA+1 I $D(^NURSA(213.4,DA(1),1,DA,0)) G ADD
|
||
|
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"
|
||
|
S DIK="^NURSA(213.4,DA(1),1," D IX1^DIK K DIK
|
||
|
L -^NURSA(213.4,DA(1),0)
|
||
|
Q
|