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

PRSAUTL.m

Go to the documentation of this file.
  1. PRSAUTL ; HISC/REL-Utilities ;6/4/93 11:19
  1. ;;4.0;PAID;**21**;Sep 21, 1995
  1. S USR="",SSN=$P($G(^VA(200,DUZ,1)),"^",9)
  1. I SSN="" W !!,*7,"Your SSN was not found in the New Person File!" S TLI="" Q
  1. S USR=$O(^PRSPC("SSN",SSN,0))
  1. TL ; Select T&L from among those allowed
  1. K DIC I PRSTLV>5 G P1
  1. S Z1=$S(PRSTLV=2:"T",PRSTLV="3":"S",1:"*")
  1. S TLI=$O(^PRST(455.5,"A"_Z1,DUZ,0)) I TLI<1 W !!,*7,"No T&L Units have been assigned to you!" Q
  1. I $O(^PRST(455.5,"A"_Z1,DUZ,TLI))<1 G P2
  1. S DIC("S")="I $D(^PRST(455.5,+Y,Z1,DUZ))"
  1. P1 S DIC="^PRST(455.5,",DIC(0)="AEQM",DIC("A")="Select T&L Unit: " W ! D ^DIC K DIC I "^"[X!$D(DTOUT) S TLI="" Q
  1. G:Y<1 P1 S TLI=+Y
  1. P2 S TLE=$P($G(^PRST(455.5,TLI,0)),"^",1) Q
  1. QUE ; Queue a task
  1. K IO("Q"),ZTUCI,ZTDTH,ZTIO,ZTSAVE S ZTRTN=PRSAPGM,ZTREQ="@"
  1. S ZTSAVE("ZTREQ")="",ZTSAVE("PRSTLV")="",ZTDESC=$P(XQY0,"^",1)
  1. F V3=1:1 S V1=$P(PRSALST,"^",V3) Q:V1="" S ZTSAVE(V1)=""
  1. D ^%ZTLOAD D ^%ZISC U IO W !,"Request Queued",! K V1,V3,PRSAPGM,PRSALST,ZTSK Q
  1. CONTINUE() ;ASK USER TO CONTINE
  1. ;
  1. S ANSWER=1
  1. S DIR("A")="Continue"
  1. S DIR(0)="Y",DIR("B")="NO" D ^DIR
  1. I $D(DIRUT)!(Y=0) S ANSWER=0
  1. Q ANSWER