[613] | 1 | PXEDIM ;ISL/PKR - Main driver for letting users look at PCE device interface errors. ;6/7/96
|
---|
| 2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
|
---|
| 3 | ;
|
---|
| 4 | ;Give the user a choice on how to look up errors.
|
---|
| 5 | N TEMP,X,Y
|
---|
| 6 | K DIRUT,DTOUT,DUOUT
|
---|
| 7 | S DIR(0)="SO"_U_"ERN:Error Number;PDT:Processing Date and Time;EDT:Encounter Date and Time;PAT:Patient Name"
|
---|
| 8 | S DIR("A")="Look up PCE device interface errors based on"
|
---|
| 9 | S DIR("B")="ERN"
|
---|
| 10 | S TEMP="You may look up PCE device interface errors by Error Number, Error Date and Time,"
|
---|
| 11 | S TEMP=TEMP_" Encounter Date and Time, or by Patient Name."
|
---|
| 12 | S DIR("?")=TEMP
|
---|
| 13 | D ^DIR K DIR
|
---|
| 14 | I Y=(U_U) S DTOUT=1
|
---|
| 15 | I ($D(DTOUT))!($D(DUOUT)) Q
|
---|
| 16 | ;
|
---|
| 17 | ;Get the detailed look up information.
|
---|
| 18 | N BERN,BENDT,BERDT,EERN,EENDT,EERDT
|
---|
| 19 | N OPT,PATIENT,NPATIENT
|
---|
| 20 | S OPT=Y
|
---|
| 21 | I OPT="EDT" D DT^PXEDILUD(.BENDT,.EENDT,"ENCOUNTER")
|
---|
| 22 | I OPT="ERN" D EN^PXEDILUD(.BERN,.EERN)
|
---|
| 23 | I OPT="PAT" D PAT^PXEDILUD
|
---|
| 24 | I OPT="PDT" D DT^PXEDILUD(.BERDT,.EERDT,"PROCESSING")
|
---|
| 25 | I ($D(DTOUT))!($D(DUOUT)) Q
|
---|
| 26 | ;
|
---|
| 27 | ;Make sure the scratch array is initialized.
|
---|
| 28 | K ^TMP("PXEDI",$J)
|
---|
| 29 | ;
|
---|
| 30 | ;Look up the errors.
|
---|
| 31 | I OPT="ERN" D ERN^PXEDIELU
|
---|
| 32 | I OPT="PDT" D PDT^PXEDIELU
|
---|
| 33 | I OPT="EDT" D EDT^PXEDIELU
|
---|
| 34 | I OPT="PAT" D PAT^PXEDIELU
|
---|
| 35 | ;
|
---|
| 36 | I '$D(^TMP("PXEDI",$J)) D Q
|
---|
| 37 | . W !!,"There are no PCE device interface errors to process!",!
|
---|
| 38 | ;
|
---|
| 39 | ;Determine where the listing will be printed.
|
---|
| 40 | S %ZIS="QM"
|
---|
| 41 | W !
|
---|
| 42 | D ^%ZIS
|
---|
| 43 | I POP G END
|
---|
| 44 | ;
|
---|
| 45 | ;Queue the report.
|
---|
| 46 | N DESC,IODEV
|
---|
| 47 | I $D(IO("Q")) D
|
---|
| 48 | . S DESC="Print PCE device interface errors"
|
---|
| 49 | . S IODEV=ION_";"_IOST_";"_IOM_";"_IOSL
|
---|
| 50 | . S ZTSAVE("^TMP(""PXEDI"",$J,")=""
|
---|
| 51 | . S ZTSAVE("BERN")="",ZTSAVE("EERN")=""
|
---|
| 52 | . S ZTSAVE("BENDT")="",ZTSAVE("EENDT")=""
|
---|
| 53 | . S ZTSAVE("BERDT")="",ZTSAVE("EERDT")=""
|
---|
| 54 | . S ZTSAVE("PATIENT(")="",ZTSAVE("NPATIENT")=""
|
---|
| 55 | . S ZTSAVE("OPT")=""
|
---|
| 56 | . S ZTDESC=DESC
|
---|
| 57 | . S ZTIO=IODEV
|
---|
| 58 | . S ZTDTH=$$NOW^XLFDT
|
---|
| 59 | . S ZTRTN="PR^PXEDIP"
|
---|
| 60 | . D ^%ZTLOAD
|
---|
| 61 | . I $D(ZTSK)[0 W !!,DESC_" cancelled"
|
---|
| 62 | . E W !!,DESC_" has been queued, task number "_ZTSK
|
---|
| 63 | ;Non queued output.
|
---|
| 64 | E D PR^PXEDIP
|
---|
| 65 | ;
|
---|
| 66 | END ;
|
---|
| 67 | D HOME^%ZIS
|
---|
| 68 | K IO("Q")
|
---|
| 69 | K POP
|
---|
| 70 | K ^TMP("PXEDI",$J)
|
---|
| 71 | Q
|
---|