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

PXEDIM.m

Go to the documentation of this file.
  1. PXEDIM ;ISL/PKR - Main driver for letting users look at PCE device interface errors. ;6/7/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
  1. ;
  1. ;Give the user a choice on how to look up errors.
  1. N TEMP,X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. S DIR(0)="SO"_U_"ERN:Error Number;PDT:Processing Date and Time;EDT:Encounter Date and Time;PAT:Patient Name"
  1. S DIR("A")="Look up PCE device interface errors based on"
  1. S DIR("B")="ERN"
  1. S TEMP="You may look up PCE device interface errors by Error Number, Error Date and Time,"
  1. S TEMP=TEMP_" Encounter Date and Time, or by Patient Name."
  1. S DIR("?")=TEMP
  1. D ^DIR K DIR
  1. I Y=(U_U) S DTOUT=1
  1. I ($D(DTOUT))!($D(DUOUT)) Q
  1. ;
  1. ;Get the detailed look up information.
  1. N BERN,BENDT,BERDT,EERN,EENDT,EERDT
  1. N OPT,PATIENT,NPATIENT
  1. S OPT=Y
  1. I OPT="EDT" D DT^PXEDILUD(.BENDT,.EENDT,"ENCOUNTER")
  1. I OPT="ERN" D EN^PXEDILUD(.BERN,.EERN)
  1. I OPT="PAT" D PAT^PXEDILUD
  1. I OPT="PDT" D DT^PXEDILUD(.BERDT,.EERDT,"PROCESSING")
  1. I ($D(DTOUT))!($D(DUOUT)) Q
  1. ;
  1. ;Make sure the scratch array is initialized.
  1. K ^TMP("PXEDI",$J)
  1. ;
  1. ;Look up the errors.
  1. I OPT="ERN" D ERN^PXEDIELU
  1. I OPT="PDT" D PDT^PXEDIELU
  1. I OPT="EDT" D EDT^PXEDIELU
  1. I OPT="PAT" D PAT^PXEDIELU
  1. ;
  1. I '$D(^TMP("PXEDI",$J)) D Q
  1. . W !!,"There are no PCE device interface errors to process!",!
  1. ;
  1. ;Determine where the listing will be printed.
  1. S %ZIS="QM"
  1. W !
  1. D ^%ZIS
  1. I POP G END
  1. ;
  1. ;Queue the report.
  1. N DESC,IODEV
  1. I $D(IO("Q")) D
  1. . S DESC="Print PCE device interface errors"
  1. . S IODEV=ION_";"_IOST_";"_IOM_";"_IOSL
  1. . S ZTSAVE("^TMP(""PXEDI"",$J,")=""
  1. . S ZTSAVE("BERN")="",ZTSAVE("EERN")=""
  1. . S ZTSAVE("BENDT")="",ZTSAVE("EENDT")=""
  1. . S ZTSAVE("BERDT")="",ZTSAVE("EERDT")=""
  1. . S ZTSAVE("PATIENT(")="",ZTSAVE("NPATIENT")=""
  1. . S ZTSAVE("OPT")=""
  1. . S ZTDESC=DESC
  1. . S ZTIO=IODEV
  1. . S ZTDTH=$$NOW^XLFDT
  1. . S ZTRTN="PR^PXEDIP"
  1. . D ^%ZTLOAD
  1. . I $D(ZTSK)[0 W !!,DESC_" cancelled"
  1. . E W !!,DESC_" has been queued, task number "_ZTSK
  1. ;Non queued output.
  1. E D PR^PXEDIP
  1. ;
  1. END ;
  1. D HOME^%ZIS
  1. K IO("Q")
  1. K POP
  1. K ^TMP("PXEDI",$J)
  1. Q