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

ANSUD.m

Go to the documentation of this file.
ANSUD ;IHS/OIRM/DSD/CSC - SELECT DATE/SHIFT/UNIT; [ 02/25/98  10:32 AM ]
 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
 ;;SELECT DATE/SHIFT/UNIT
EN ;EP;TO SELECT DATE, SHIFT AND NURSING UNIT
 K ANSSH,ANSUN,ANSRB
 D DATE
 Q:$D(DTOUT)!$D(DUOUT)
 D SHIFT
 Q:$D(DTOUT)!$D(DUOUT)
 D UNIT
 Q
DATE ;EP;TO SELECT DATE
 I '$D(ANSPAR) S ANSPAR=^ANSD(51,1,0)
 I $G(ANSDT)?7N S Y=ANSDT X ^DD("DD") S DIR("B")=Y
 D NOW^%DTC  ;CSC 10-97
 S DIR(0)="DO^:"_X,DIR("A")="Date..........."
 D DIR^ANSDIC
 Q:$D(DTOUT)!$D(DUOUT)
 I $G(Y(0))'="" S ANSDT=Y(0) W "  "_ANSDT  ;CSC 10-97
 I $G(Y)<1 S DUOUT="" Q
 S ANSDT=Y
 Q
SHIFT ;EP;TO SELECT SHIFT
 Q:'$D(ANSPAR)
 K ANSSH
 S ANSS=$P(ANSPAR,U,5)
 S X=$P($T(@ANSS),";;",2)
 S DIR(0)="SOA^"_X,DIR("A")="Shift..........: "
 S X=$P($T(@ANSS),";;",2),DIR("?")="Choose from: "_$TR(X,":;","- ")
 W !
 D DIR^ANSDIC
 Q:$D(DTOUT)!$D(DUOUT)
 I $G(Y)<1 S DUOUT="",ANSSH="" Q  ;CSC12-19-96
 S ANSSH=+Y
 Q
NEWUNIT ;EP;TO ADD NEW NURSING UNITS
 K DIC
 S DIC(0)="AELMQZ"
UNIT ;EP;TO SELECT NURSING UNIT
 Q:'$D(ANSPAR)
 K ANSUN
 S X=$P(ANSPAR,U,3)
 I X,$D(^ANSD(59.1,X,0)) S DIC("B")=$P(^(0),U)
 S DIC="^ANSD(59.1,",DIC(0)=$S('$D(DIC(0))#2:"AEMQZ",1:DIC(0)),DIC("A")="Nursing Unit...: "
 W !
 D DIC^ANSDIC
 Q:$D(DTOUT)!$D(DUOUT)
 I $G(Y)<1 S DUOUT="" Q
 S ANSUN=+Y,ANSUNIT=Y(0)
 Q
2 ;;1:DAY;2:NIGHT
3 ;;1:DAY;2:EVENING;3:NIGHT