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

ANSEA2.m

Go to the documentation of this file.
ANSEA2 ;IHS/OIRM/DSD/CSC - FILE ACUITY DATA; [ 02/25/98  10:32 AM ]
 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
 ;SET ACUITY DATA
EN K:ANSDA ^ANSR(ANSDA,"F")
 I 'ANSDA D FILE
 S DA=ANSDA,DIE="^ANSR(",DR=".02////"_ANSSH_";.03////"_ANSUN_";.04////"_ANSDFN_";.05////O;.06////"_ANSADM_";.07////"_DUZ,D=ANSDT_"."_ANSSH
 D DIE^ANSDIC
 S:'$D(^ANSR(ANSDA,"L",0)) ^ANSR(ANSDA,"L",0)="^9009052.1PA"
 F ANSI=1:1:10 D
 .I '$D(^ANSR(ANSDA,"L",ANSI,0)) D
 ..S DA(1)=ANSDA,DIC="^ANSR("_ANSDA_",""L"",",DIC(0)="L",(DINUM,X)=ANSI
 ..D FILE^ANSDIC
 .S DA(1)=ANSDA,DA=ANSI,DIE="^ANSR("_ANSDA_",""L"",",DR="1////"_$P(ANSCL,U,ANSI)
 .D DIE^ANSDIC
FACTOR ;EP
 Q:ANSAF=""
 S:'$D(^ANSR(ANSDA,"F",0)) ^ANSR(ANSDA,"F",0)="^9009052.01P^"
 F ANSI=1:1:$L(ANSAF,U) S ANSX=$P(ANSAF,U,ANSI) I ANSX,'$D(^ANSR(ANSDA,"F",ANSX,0)) D
 .S DA(1)=ANSDA,DIC="^ANSR("_ANSDA_",""F"",",DIC(0)="L",(DINUM,X)=ANSX
 .D FILE^ANSDIC
 Q
FILE ;EP;TO FILE NEW ASSESSMENT
 S X=ANSDT,DIC="^ANSR(",DIC(0)="L"
 D FILE^ANSDIC
 S ANSDA=+Y
 D EN
 Q 
DELET ;EP;CSC/DSD/1-97
 S DA=+Y,DA(1)=ANSDA,DIK="^ANSR("_DA(1)_",""F""," D DIK^ANSDIC
 Q