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

ANSQPP.m

Go to the documentation of this file.
ANSQPP ;IHS/OIRM/DSD/CSC - PRINT PATIENT ACUITY REPORT; [ 02/25/98  10:32 AM ]
 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
 ;;PRINT PATIENT ACUITY REPORT
 W:$G(IOST)["C-" @IOF
CUR S M=0,X=DT_".9",ANSDX=""
 I $D(^ANSR(ANSADM,"DX")) S ANSDX=^("DX")
 F  S M=$O(^ANSR(ANSADM,"AT",M)) Q:M=""!(M>X)  D
 .I M>X D C3 Q
 .S O=0,ANSMR=M
 .F  S O=$O(^ANSR(ANSADM,"AT",M,O)) Q:O=""  D
 ..I $D(^ANSR(O,0)),$P(^(0),U,5)="D" S A=0 Q
 ..E  S N=O
 D C3
 Q
C3 S (ANSCL,ANSAF)=""
 I N,$D(^ANSR(N,0)) S ANSDT=$P(^(0),U),ANSSH=$P(^(0),U,2),ANSUN=$P(^(0),U,3)
 D:N
 .S M=0 F I=1:1 S M=$O(^ANSR(N,"L",M)) Q:M<1  I $D(^(M,0)) S $P(ANSCL,U,M)=$P(^(0),U,2)
 .S M=0 F I=1:1 S M=$O(^ANSR(N,"F",M)) Q:M=""  I $D(^(M,0)) S:ANSAF]"" ANSAF=ANSAF_U S ANSAF=ANSAF_M
 D ^ANSQPP1
 Q