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

LA7ADL2.m

Go to the documentation of this file.
  1. LA7ADL2 ;DALISC/JMC - Start/Stop Automatic Download of Test Orders ; 1/30/95 09:00;
  1. ;;5.2;LAB MESSAGING;**23,27**;Sep 27, 1994
  1. ;
  1. EN ; Entry point to flag auto download to start/stop.
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y,Z
  1. S Z=$$SHOWST^LA7ADL1
  1. S Z("CNT")=$$LACHK^LA7CHKF
  1. S DIR(0)="SO^1:Start/Restart Auto Download Job;2:Shutdown Auto Download Job;3:Shutdown Auto Download Job and Stop Collecting Accessions"
  1. S DIR("A")="Select action"
  1. S DIR("A",1)="Current Status is: "_$P(Z,"^")
  1. I $L($P(Z,"^",2)) D
  1. . S DIR("A",2)=" at: "_$P(Z,"^",2)
  1. . S DIR("A",3)=" by: "_$P(Z,"^",3)
  1. . S DIR("A",4)="There are "_$S(Z("CNT"):Z("CNT"),1:"NO")_" accessions waiting checking"
  1. . S DIR("A",5)=" "
  1. E S DIR("A",2)="There are "_$S(Z("CNT"):Z("CNT"),1:"NO")_" accessions waiting checking",DIR("A",3)=" "
  1. K X,Y
  1. S DIR("?",1)="1 - Start/Restart the auto download job after changes have been made to"
  1. S DIR("?",2)=" file #62.4, AUTO INSTRUMENT, that affect auto downloading,"
  1. S DIR("?",3)=" i.e. instrument auto download status changed, tests added/removed,"
  1. S DIR("?",4)=" download code changed, etc. or if background job is not running."
  1. S DIR("?",5)=" "
  1. S DIR("?",6)="2 - Shuts down auto download background job and set flag to not start."
  1. S DIR("?",7)=" Accessions are still collected in list to be downloaded when"
  1. S DIR("?",8)=" auto download job is started."
  1. S DIR("?",9)=" "
  1. S DIR("?")="3 - Same as 2 but stops collecting accessions to download."
  1. D ^DIR
  1. I $D(DIRUT) Q ; No selection by user.
  1. I Y>0 D
  1. . D SETSTOP^LA7ADL1(+Y,$G(DUZ)) ; Set node to flag auto download job.
  1. . S Z=$$SHOWST^LA7ADL1
  1. . W !,"Auto Download flag set to ",$P(Z,"^"),!
  1. I +Y=1 D ; Task auto down to run in case it is not running.
  1. . D ZTSK^LA7ADL
  1. . W "Auto Download "
  1. . I $D(ZTSK) W "- Queued to run as task #",ZTSK,! Q
  1. . W $C(7),"- not tasked",!
  1. Q