- PXEDIP ;ISL/PKR - Routines to print PCE device interface errors. ;6/7/96
- ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
- ;
- ;=======================================================================
- PR ;Print the report.
- N DONE,INDENT,PAGE,PATDFN,POP,PXRROPT,TYPE
- ;
- ;Allow the task to be cleaned up upon successful completion.
- I $D(ZTSK) S ZTREQ="@"
- ;
- U IO
- D GENHEAD
- ;Write out the specific information.
- S DONE=0
- S INDENT=5
- I OPT="EDT" D EDT
- I OPT="ERN" D ERN
- I OPT="PAT" D PAT
- I OPT="PDT" D PDT
- Q
- ;
- ;=======================================================================
- EDT ;Print the errors based on encounter date and time.
- S PATDFN=0
- S TYPE="EDT"
- W !!,"Report based on Encounter Date and Time:"
- W !,?INDENT,$$FMTE^XLFDT(BENDT,1)," through ",$$FMTE^XLFDT(EENDT,1),"."
- D ERRLST^PXEDIEL
- Q
- ;
- ;=======================================================================
- ERN ;Print the errors based on error number.
- S PATDFN=0
- S TYPE="ERN"
- W !!,"Report based on Error Numbers ",BERN," through ",EERN,"."
- D ERRLST^PXEDIEL
- Q
- ;
- ;=======================================================================
- PAT ;Print the errors based on patients.
- N IC
- S TYPE="PAT"
- W !!,"Report based on errors by patient."
- F IC=1:1:NPATIENT D
- . S (DFN,PATDFN)=PATIENT(IC)
- . D DEM^VADPT
- . W !,"Errors for patient ",VADM(1)," ",$P(VADM(2),U,2)
- . D ERRLST^PXEDIEL
- . D KVA^VADPT
- Q
- ;
- ;=======================================================================
- PDT ;Print the errors based on error date and time.
- S PATDFN=0
- S TYPE="PDT"
- D GENHEAD
- W !!,"Report based on Processing Date and Time:"
- W !,?INDENT,$$FMTE^XLFDT(BERDT,1)," through ",$$FMTE^XLFDT(EERDT,1),"."
- D ERRLST^PXEDIEL
- Q
- ;
- ;=======================================================================
- GENHEAD ;Print the general report heading.
- S PAGE=0
- D PAGE
- Q
- ;
- ;=======================================================================
- PAGE ;form feed to new page
- I (PAGE>0)&(($E(IOST)="C")&(IO=IO(0))) D
- . S DIR(0)="E"
- . W !
- . D ^DIR K DIR
- I $D(DUOUT)!($D(DTOUT)) D Q
- . S DONE=1
- I PAGE>0 W:$D(IOF) @IOF
- S PAGE=PAGE+1
- D HDR^PXRRGPRT(PAGE)
- Q
- ;
- PXEDIP ;ISL/PKR - Routines to print PCE device interface errors. ;6/7/96
- +1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
- +2 ;
- +3 ;=======================================================================
- PR ;Print the report.
- +1 NEW DONE,INDENT,PAGE,PATDFN,POP,PXRROPT,TYPE
- +2 ;
- +3 ;Allow the task to be cleaned up upon successful completion.
- +4 IF $DATA(ZTSK)
- SET ZTREQ="@"
- +5 ;
- +6 USE IO
- +7 DO GENHEAD
- +8 ;Write out the specific information.
- +9 SET DONE=0
- +10 SET INDENT=5
- +11 IF OPT="EDT"
- DO EDT
- +12 IF OPT="ERN"
- DO ERN
- +13 IF OPT="PAT"
- DO PAT
- +14 IF OPT="PDT"
- DO PDT
- +15 QUIT
- +16 ;
- +17 ;=======================================================================
- EDT ;Print the errors based on encounter date and time.
- +1 SET PATDFN=0
- +2 SET TYPE="EDT"
- +3 WRITE !!,"Report based on Encounter Date and Time:"
- +4 WRITE !,?INDENT,$$FMTE^XLFDT(BENDT,1)," through ",$$FMTE^XLFDT(EENDT,1),"."
- +5 DO ERRLST^PXEDIEL
- +6 QUIT
- +7 ;
- +8 ;=======================================================================
- ERN ;Print the errors based on error number.
- +1 SET PATDFN=0
- +2 SET TYPE="ERN"
- +3 WRITE !!,"Report based on Error Numbers ",BERN," through ",EERN,"."
- +4 DO ERRLST^PXEDIEL
- +5 QUIT
- +6 ;
- +7 ;=======================================================================
- PAT ;Print the errors based on patients.
- +1 NEW IC
- +2 SET TYPE="PAT"
- +3 WRITE !!,"Report based on errors by patient."
- +4 FOR IC=1:1:NPATIENT
- Begin DoDot:1
- +5 SET (DFN,PATDFN)=PATIENT(IC)
- +6 DO DEM^VADPT
- +7 WRITE !,"Errors for patient ",VADM(1)," ",$PIECE(VADM(2),U,2)
- +8 DO ERRLST^PXEDIEL
- +9 DO KVA^VADPT
- End DoDot:1
- +10 QUIT
- +11 ;
- +12 ;=======================================================================
- PDT ;Print the errors based on error date and time.
- +1 SET PATDFN=0
- +2 SET TYPE="PDT"
- +3 DO GENHEAD
- +4 WRITE !!,"Report based on Processing Date and Time:"
- +5 WRITE !,?INDENT,$$FMTE^XLFDT(BERDT,1)," through ",$$FMTE^XLFDT(EERDT,1),"."
- +6 DO ERRLST^PXEDIEL
- +7 QUIT
- +8 ;
- +9 ;=======================================================================
- GENHEAD ;Print the general report heading.
- +1 SET PAGE=0
- +2 DO PAGE
- +3 QUIT
- +4 ;
- +5 ;=======================================================================
- PAGE ;form feed to new page
- +1 IF (PAGE>0)&(($EXTRACT(IOST)="C")&(IO=IO(0)))
- Begin DoDot:1
- +2 SET DIR(0)="E"
- +3 WRITE !
- +4 DO ^DIR
- KILL DIR
- End DoDot:1
- +5 IF $DATA(DUOUT)!($DATA(DTOUT))
- Begin DoDot:1
- +6 SET DONE=1
- End DoDot:1
- QUIT
- +7 IF PAGE>0
- IF $DATA(IOF)
- WRITE @IOF
- +8 SET PAGE=PAGE+1
- +9 DO HDR^PXRRGPRT(PAGE)
- +10 QUIT
- +11 ;