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

ANSQPS.m

Go to the documentation of this file.
ANSQPS ;IHS/OIRM/DSD/CSC - PRINT PATIENT ACUITY REPORTS; [ 02/25/98  10:32 AM ]
 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
 ;;PRINT PATIENT ACUITY REPORTS
EN I '$D(ANSPAR) S ANSPAR=^ANSD(51,1,0)
 I $D(ANSUNIT) D SB1
 S ANSPTX=""
 F  S ANSPTX=$O(^TMP("ANS",ANSJOB,"P",ANSPTX)) Q:ANSPTX=""!$D(DTOUT)!$D(DUOUT)  D
 .S ANSDFN=0
 .F  S ANSDFN=$O(^TMP("ANS",ANSJOB,"P",ANSPTX,ANSDFN)) Q:ANSDFN=""!$D(DTOUT)!$D(DUOUT)  D
 ..S ANSADM=^TMP("ANS",ANSJOB,"P",ANSPTX,ANSDFN)
 ..D ^ANSQPP
 I $G(IOST)["P-" W @IOF
 K ^TMP("ANS",ANSJOB)
 Q
SB1 S ANSDFN=""
 F  S ANSDFN=$O(^ANSR("PT",ANSDFN)) Q:ANSDFN=""  D
 .Q:'$D(^DPT(ANSDFN,0))
 .S X=$P(^DPT(ANSDFN,0),U)
 .S ANSADM=0
 .F  S ANSADM=$O(^ANSR("PT",ANSDFN,ANSADM)) Q:ANSADM=""  D
 ..Q:'$D(^ANSR(ANSADM,0))
 ..Q:'$D(^ANSR(ANSADM,"DX"))
 ..Q:$P(^ANSR(ANSADM,"DX"),U,2)'=ANSUNIT
 ..S ^TMP("ANS",ANSJOB,"P",$E(X,1,30),ANSDFN)=ANSADM
 Q