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

PXRMXQUE.m

Go to the documentation of this file.
  1. PXRMXQUE ;SLC/PJH - Reminder reports general queuing routine. ;09/12/2012
  1. ;;2.0;CLINICAL REMINDERS;**4,6,12,17,24**;Feb 04, 2005;Build 193
  1. ;
  1. ;===============================
  1. DEVICE(RTN,DESC,SAVE,%ZIS,RETZTSK) ;
  1. ;Pass RETZTSK as number such as 1 if you want to get ZTSK.
  1. N ZTSK
  1. W !
  1. D EN^XUTMDEVQ(RTN,DESC,.SAVE,.%ZIS,RETZTSK)
  1. I $D(ZTSK) W !!,DESC," has been queued, task number "_ZTSK H 2
  1. Q $G(ZTSK)
  1. ;
  1. ;===============================
  1. JOB ;Get the output device.
  1. N POP,%ZIS
  1. S %ZIS="NQ"
  1. W !
  1. D ^%ZIS
  1. I POP G EXIT^PXRMXD
  1. I IOT="HFS" S PXRMHFIO=IO
  1. S PXRMQUE=$G(IO("Q"))
  1. S PXRMIOP=ION_";"_$G(IOST)_";"_$G(IO("DOC"))_";"_$G(IOM)_";"_$G(IOSL)
  1. ;
  1. I PXRMQUE D Q
  1. .;Queue the report.
  1. . N DESC,ROUTINE,TASK
  1. . S DESC="Reminder Due Report"
  1. . S ROUTINE="START^PXRMXSE1"
  1. . S TASK=$$QUE^PXRMXQUE(DESC,ROUTINE,"","SAVE^PXRMXQUE")
  1. . Q:TASK=""
  1. . W !,"Report queued, task number is ",TASK
  1. I 'PXRMQUE D ^PXRMXSE1
  1. Q
  1. ;
  1. ;===============================
  1. QUE(ZTDESC,ZTRTN,ZTDTH,SAVERTN) ;Queue a task.
  1. N ZTSK
  1. ;If ZTIO is not explicitly set to null then %ZTLOAD will open
  1. ;the device.
  1. S ZTIO=""
  1. D @SAVERTN
  1. D ^%ZTLOAD
  1. I $D(ZTSK)=0 W !!,DESC," cancelled." Q ""
  1. Q ZTSK
  1. ;
  1. ;===============================
  1. SAVE ;Save the variables for queing.
  1. S ZTSAVE("PXRMBDT")="",ZTSAVE("PXRMEDT")="",ZTSAVE("PXRMSDT")=""
  1. S ZTSAVE("PXRMCS(")="",ZTSAVE("NCS")=""
  1. S ZTSAVE("PXRMCGRP(")="",ZTSAVE("NCGRP")=""
  1. S ZTSAVE("PXRMFAC(")="",ZTSAVE("NFAC")=""
  1. S ZTSAVE("PXRMFACN(")=""
  1. S ZTSAVE("PXRMFCMB")=""
  1. S ZTSAVE("PXRMFUT")="",ZTSAVE("PXRMDLOC")=""
  1. S ZTSAVE("PXRMFD")=""
  1. S ZTSAVE("PXRMHFIO")=""
  1. S ZTSAVE("PXRMINP")=""
  1. S ZTSAVE("PXRMIO")=""
  1. S ZTSAVE("PXRMIOP")=""
  1. S ZTSAVE("PXRMLCHL(")="",ZTSAVE("NHL")=""
  1. S ZTSAVE("PXRMLCMB")=""
  1. S ZTSAVE("PXRMLCSC")=""
  1. S ZTSAVE("PXRMPRIM")=""
  1. S ZTSAVE("PXRMQUE")=""
  1. S ZTSAVE("PXRMREP")=""
  1. S ZTSAVE("PXRMRT")=""
  1. S ZTSAVE("PXRMSCAT")="",ZTSAVE("PXRMSCAT(")=""
  1. S ZTSAVE("PXRMSEL")=""
  1. S ZTSAVE("PXRMSRT")=""
  1. S ZTSAVE("PXRMSSN")=""
  1. S ZTSAVE("PXRMTABC")=""
  1. S ZTSAVE("PXRMTABS")=""
  1. S ZTSAVE("PXRMTCMB")=""
  1. S ZTSAVE("PXRMTMP")=""
  1. S ZTSAVE("PXRMTOT")=""
  1. S ZTSAVE("PXRMXTMP")=""
  1. ; Time initiated
  1. S ZTSAVE("PXRMXST")=""
  1. ; New selection criteria
  1. S ZTSAVE("PXRMOTM(")="",ZTSAVE("NOTM")=""
  1. S ZTSAVE("PXRMPRV(")="",ZTSAVE("NPRV")=""
  1. S ZTSAVE("PXRMPAT(")="",ZTSAVE("NPAT")=""
  1. S ZTSAVE("PXRMPCM(")="",ZTSAVE("NPCM")=""
  1. S ZTSAVE("PXRMREM(")="",ZTSAVE("NREM")=""
  1. S ZTSAVE("PXRMRCAT(")="",ZTSAVE("NCAT")=""
  1. S ZTSAVE("PXRMUSER")=""
  1. ;Reminder list
  1. S ZTSAVE("REMINDER(")=""
  1. ; Arrays by IEN
  1. S ZTSAVE("PXRMLOCN(")=""
  1. S ZTSAVE("PXRMCSN(")=""
  1. S ZTSAVE("PXRMCGRN(")=""
  1. ;Patient List
  1. S ZTSAVE("PATCREAT")=""
  1. S ZTSAVE("PATLST")=""
  1. S ZTSAVE("PXRMLIST(")=""
  1. S ZTSAVE("PXRMLIS1")=""
  1. S ZTSAVE("PLISTPUG")=""
  1. ;User DUZ
  1. S ZTSAVE("DBDUZ")=""
  1. S ZTSAVE("DBERR")=""
  1. S ZTSAVE("PXRMRERR(")=""
  1. ;Dubug information
  1. S ZTSAVE("PXRMDBUG")=""
  1. S ZTSAVE("PXRMDBUS")=""
  1. ;Patient Information
  1. S ZTSAVE("PXRMTPAT")=""
  1. S ZTSAVE("PXRMDPAT")=""
  1. I +$G(PXRMIDOD)>0 S ZTSAVE("PXRMIDOD")=""
  1. S ZTSAVE("PXRMPML")=""
  1. S ZTSAVE("PXRMPER")=""
  1. S ZTSAVE("PXRMCCS")=""
  1. S ZTSAVE("PXRMXCCS")=""
  1. I $D(^TMP("XM-MESS",$J)) S ZTSAVE("^TMP(""XM-MESS"",$J,")=""
  1. Q
  1. ;