ANSQ ;IHS/OIRM/DSD/CSC - TASK QUEUEING MAINLINE; [ 02/25/98 10:32 AM ]
;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
ZIS D ^ANSCZIS:'$D(DUOUT),^ANSEXIT
Q
EN D EN1
EXIT K ANSTSK,ANSF,ANST,ANSPLK,ANSCOUNT
Q
EN1 S DIR(0)="SO^1:Print for ALL Patients in a Unit;2:Print for Individual Patients"
S DIR("?",1)="You May Print The Report For Individual Patients",DIR("?")="Or For All Patients On A Specific Unit."
W !
D DIR^ANSDIC
I $D(DTOUT)!$D(DUOUT)!($G(Y)<1) S DUOUT="" Q
I Y=1 D B1 S Y=1
I Y=2 D A1 S Y=2
Q
A1 S ANSJOB=$J_($P($H,",")_$P($H,",",2))
F D A11 Q:'$D(ANSDFN)
Q
A11 K ANSDFN
D ^ANSUPT
Q:$D(DTOUT)!$D(DUOUT)
I '$G(ANSDFN) S:'$D(^TMP("ANS",+$G(ANSJOB),"P")) DUOUT="" Q
S ANSADM=$O(^ANSR("PT",ANSDFN,0))
I 'ANSADM W *7,!!,"NOT Currently An Inpatient." Q
S ^TMP("ANS",ANSJOB,"P",$E($P(^DPT(ANSDFN,0),U),1,30),ANSDFN)=ANSADM
Q
B1 ;EP;SELECT NURSING UNIT FOR REPORT
K ANSUNIT
S ANSJOB=$J_($P($H,",")_$P($H,",",2))
S Y=$P(ANSPAR,U,3),DIC="^ANSD(59.1,",DIC(0)="AQZEM",DIC("A")="Which Unit: " S:Y DIC("B")=$P(^ANSD(59.1,Y,0),U)
W !
D DIC^ANSDIC
I $G(Y)<1 S DUOUT="" Q
S ANSUNIT=+Y
Q
ACUITY ;EP;PATIENT ACUITY REPORT
S ANSRTN="^ANSQPS"
S ANSZ="Patient Acuity Report"
D HEAD
I '$D(ANSHEAD) D EN,ZIS
Q
HISTORY ;EP;QUEUE PATIENT ASSESSMENT HISTORY REPORT
S ANSRTN="^ANSQPAS"
S ANSZ="Patient Assessment History"
D HEAD
I '$D(ANSHEAD) D EN,ZIS
Q
ROSTER ;EP;QUEUE NURSING UNIT ROSTER
S ANSRTN="^ANSQRS"
S ANSZ="Ward Roster"
I '$D(ANSHEAD) D B1,ZIS
Q
STAFSTAT ;EP;QUEUE NURSE STAFFING STATS
S ANSZ="Staffing Statistics"
I $D(ANSHEAD) D HEAD Q
S DIR(0)="DO^:"_DT,DIR("A")="Starting Date"
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)!($G(Y)="")
S ANSBDT=Y W " "_Y(0) ;CSC 10-97
S DIR(0)="DO^:"_DT,DIR("A")="Ending Date.."
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)!($G(Y)="")
S ANSEDT=Y W " "_Y(0) ;CSC 10-97
S DIR(0)="YO",DIR("A")="Print For Each Shift",DIR("B")="YES"
S DIR("?",1)="You May Print This Report For Individual Shifts or",DIR("?")="For The Whole Day. Enter 'YES' or 'NO'"
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)
S ANSPO=$S(Y=1:"S",1:"D"),ANSRTN="^ANSQSS"
D B1,ZIS
Q
HEAD ;EP;
;D ^ANSMENU
D HEAD^ANSMENU ;CSC 10-97
W:$G(ANSZ)]"" !!,?80-$L(ANSZ)/2,ANSZ
Q
ANSQ ;IHS/OIRM/DSD/CSC - TASK QUEUEING MAINLINE; [ 02/25/98 10:32 AM ]
+1 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
ZIS IF '$DATA(DUOUT)
DO ^ANSCZIS
DO ^ANSEXIT
+1 QUIT
EN DO EN1
EXIT KILL ANSTSK,ANSF,ANST,ANSPLK,ANSCOUNT
+1 QUIT
EN1 SET DIR(0)="SO^1:Print for ALL Patients in a Unit;2:Print for Individual Patients"
+1 SET DIR("?",1)="You May Print The Report For Individual Patients"
SET DIR("?")="Or For All Patients On A Specific Unit."
+2 WRITE !
+3 DO DIR^ANSDIC
+4 IF $DATA(DTOUT)!$DATA(DUOUT)!($GET(Y)<1)
SET DUOUT=""
QUIT
+5 IF Y=1
DO B1
SET Y=1
+6 IF Y=2
DO A1
SET Y=2
+7 QUIT
A1 SET ANSJOB=$JOB_($PIECE($HOROLOG,",")_$PIECE($HOROLOG,",",2))
+1 FOR
DO A11
IF '$DATA(ANSDFN)
QUIT
+2 QUIT
A11 KILL ANSDFN
+1 DO ^ANSUPT
+2 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+3 IF '$GET(ANSDFN)
IF '$DATA(^TMP("ANS",+$GET(ANSJOB),"P"))
SET DUOUT=""
QUIT
+4 SET ANSADM=$ORDER(^ANSR("PT",ANSDFN,0))
+5 IF 'ANSADM
WRITE *7,!!,"NOT Currently An Inpatient."
QUIT
+6 SET ^TMP("ANS",ANSJOB,"P",$EXTRACT($PIECE(^DPT(ANSDFN,0),U),1,30),ANSDFN)=ANSADM
+7 QUIT
B1 ;EP;SELECT NURSING UNIT FOR REPORT
+1 KILL ANSUNIT
+2 SET ANSJOB=$JOB_($PIECE($HOROLOG,",")_$PIECE($HOROLOG,",",2))
+3 SET Y=$PIECE(ANSPAR,U,3)
SET DIC="^ANSD(59.1,"
SET DIC(0)="AQZEM"
SET DIC("A")="Which Unit: "
IF Y
SET DIC("B")=$PIECE(^ANSD(59.1,Y,0),U)
+4 WRITE !
+5 DO DIC^ANSDIC
+6 IF $GET(Y)<1
SET DUOUT=""
QUIT
+7 SET ANSUNIT=+Y
+8 QUIT
ACUITY ;EP;PATIENT ACUITY REPORT
+1 SET ANSRTN="^ANSQPS"
+2 SET ANSZ="Patient Acuity Report"
+3 DO HEAD
+4 IF '$DATA(ANSHEAD)
DO EN
DO ZIS
+5 QUIT
HISTORY ;EP;QUEUE PATIENT ASSESSMENT HISTORY REPORT
+1 SET ANSRTN="^ANSQPAS"
+2 SET ANSZ="Patient Assessment History"
+3 DO HEAD
+4 IF '$DATA(ANSHEAD)
DO EN
DO ZIS
+5 QUIT
ROSTER ;EP;QUEUE NURSING UNIT ROSTER
+1 SET ANSRTN="^ANSQRS"
+2 SET ANSZ="Ward Roster"
+3 IF '$DATA(ANSHEAD)
DO B1
DO ZIS
+4 QUIT
STAFSTAT ;EP;QUEUE NURSE STAFFING STATS
+1 SET ANSZ="Staffing Statistics"
+2 IF $DATA(ANSHEAD)
DO HEAD
QUIT
+3 SET DIR(0)="DO^:"_DT
SET DIR("A")="Starting Date"
+4 WRITE !
+5 DO DIR^ANSDIC
+6 IF $DATA(DTOUT)!$DATA(DUOUT)!($GET(Y)="")
QUIT
+7 ;CSC 10-97
SET ANSBDT=Y
WRITE " "_Y(0)
+8 SET DIR(0)="DO^:"_DT
SET DIR("A")="Ending Date.."
+9 WRITE !
+10 DO DIR^ANSDIC
+11 IF $DATA(DTOUT)!$DATA(DUOUT)!($GET(Y)="")
QUIT
+12 ;CSC 10-97
SET ANSEDT=Y
WRITE " "_Y(0)
+13 SET DIR(0)="YO"
SET DIR("A")="Print For Each Shift"
SET DIR("B")="YES"
+14 SET DIR("?",1)="You May Print This Report For Individual Shifts or"
SET DIR("?")="For The Whole Day. Enter 'YES' or 'NO'"
+15 WRITE !
+16 DO DIR^ANSDIC
+17 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+18 SET ANSPO=$SELECT(Y=1:"S",1:"D")
SET ANSRTN="^ANSQSS"
+19 DO B1
DO ZIS
+20 QUIT
HEAD ;EP;
+1 ;D ^ANSMENU
+2 ;CSC 10-97
DO HEAD^ANSMENU
+3 IF $GET(ANSZ)]""
WRITE !!,?80-$LENGTH(ANSZ)/2,ANSZ
+4 QUIT