- PXEDILUD ;ISL/PKR - Establish the details for looking up PCE device interface errors. ;6/7/96
- ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
- ;
- ;=======================================================================
- DT(BDATE,EDATE,TYPE) ;Date and time range.
- BDATE ;Select the beginning date.
- N X,Y
- K DIRUT,DTOUT,DUOUT
- S DIR(0)="D^:DT:EPTX"
- S DIR("A")="Enter beginning "_TYPE_" date and time"
- S DIR("??")=U_"D BDHELP^PXEDILUD"
- W !
- D ^DIR K DIR
- I Y=(U_U) S DTOUT=1
- I $D(DTOUT)!($D(DUOUT)) Q
- S BDATE=Y
- I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G BDATE
- ;
- EDATE ;Select the ending date.
- N NOW
- S NOW=$$FMTE^XLFDT($$NOW^XLFDT,"1")
- S DIR(0)="D^"_BDATE_":NOW:ESTX"
- S DIR("A")="Enter the ending "_TYPE_" date and time"
- S DIR("B")=NOW
- S DIR("??")=U_"D EDHELP^PXEDILUD"
- W !
- D ^DIR K DIR
- I $D(DUOUT) G BDATE
- I Y=(U_U) S DTOUT=1
- I $D(DTOUT)!($D(DUOUT)) Q
- S EDATE=Y
- I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G EDATE
- K DIRUT,DTOUT,DUOUT
- Q
- ;
- BDHELP ;Write the beginning date help.
- W !!,"This is the beginning date and time for "_TYPE_"S that should be scanned"
- W !,"for errors."
- Q
- ;
- EDHELP ;Write the ending date help.
- W !!,"This is the ending date and time for "_TYPE_"S that should be scanned"
- W !,"for errors."
- Q
- ;
- ;=======================================================================
- EN(BEN,EEN) ;Error number range.
- BENUM ;Beginning error number.
- ;Find the beginning and ending error numbers for the prompt.
- N TBEN,TEEN
- S TBEN=$O(^PX(839.01,0))
- I TBEN="" D Q
- . S (BEN,EEN)=0
- S TEEN=$O(^PX(839.01,"A"),-1)
- ;
- N X,Y
- K DIRUT,DTOUT,DUOUT
- S DIR(0)="N^"_TBEN_":"_TEEN
- S DIR("A")="Enter the beginning error number"
- S DIR("B")=TBEN
- S DIR("??")=U_"D BENHELP^PXEDILUD"
- W !
- D ^DIR K DIR
- I Y=(U_U) S DTOUT=1
- I $D(DTOUT)!($D(DUOUT)) Q
- S BEN=Y
- ;
- EENUM ;Ending error number.
- S DIR(0)="N^"_BEN_":"_TEEN
- S DIR("A")="Enter the ending error number"
- S DIR("B")=TEEN
- S DIR("??")=U_"D EENHELP^PXEDILUD"
- W !
- D ^DIR K DIR
- I $D(DUOUT) G BENUM
- I Y=(U_U) S DTOUT=1
- I $D(DTOUT)!($D(DUOUT)) Q
- S EEN=Y
- K DIRUT,DTOUT,DUOUT
- Q
- ;
- BENHELP ;Write the beginning error number help.
- W !!,"This is the beginning error number."
- Q
- ;
- EENHELP ;Write the ending error number help.
- W !!,"This is the ending error number. If it is equal to the beginning error"
- W !,"number then only one error number will be used. Otherwise all error numbers"
- W !,"in the range specified by the beginning and ending error numbers will be used."
- Q
- ;
- ;=======================================================================
- PAT ;Patient
- N DIC,X,Y
- S NPATIENT=0
- S DIC("A")="Select Patient: "
- S DIC("S")="I $D(^PX(839.01,""C"",Y))"
- NPAT S DIC=2
- I NPATIENT>0 S DIC("A")="Select another Patient: "
- S DIC(0)="AEQMZ"
- D ^DIC
- I Y=-1 G DPAT
- I $D(DTOUT)!$D(DUOUT) Q
- S NPATIENT=NPATIENT+1
- S PATIENT(NPATIENT)=+$P(Y,U,1)
- G NPAT
- ;
- DPAT ;
- Q
- ;
- PXEDILUD ;ISL/PKR - Establish the details for looking up PCE device interface errors. ;6/7/96
- +1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
- +2 ;
- +3 ;=======================================================================
- DT(BDATE,EDATE,TYPE) ;Date and time range.
- BDATE ;Select the beginning date.
- +1 NEW X,Y
- +2 KILL DIRUT,DTOUT,DUOUT
- +3 SET DIR(0)="D^:DT:EPTX"
- +4 SET DIR("A")="Enter beginning "_TYPE_" date and time"
- +5 SET DIR("??")=U_"D BDHELP^PXEDILUD"
- +6 WRITE !
- +7 DO ^DIR
- KILL DIR
- +8 IF Y=(U_U)
- SET DTOUT=1
- +9 IF $DATA(DTOUT)!($DATA(DUOUT))
- QUIT
- +10 SET BDATE=Y
- +11 IF $EXTRACT(Y,6,7)="00"
- WRITE $CHAR(7)," ?? Enter exact date"
- GOTO BDATE
- +12 ;
- EDATE ;Select the ending date.
- +1 NEW NOW
- +2 SET NOW=$$FMTE^XLFDT($$NOW^XLFDT,"1")
- +3 SET DIR(0)="D^"_BDATE_":NOW:ESTX"
- +4 SET DIR("A")="Enter the ending "_TYPE_" date and time"
- +5 SET DIR("B")=NOW
- +6 SET DIR("??")=U_"D EDHELP^PXEDILUD"
- +7 WRITE !
- +8 DO ^DIR
- KILL DIR
- +9 IF $DATA(DUOUT)
- GOTO BDATE
- +10 IF Y=(U_U)
- SET DTOUT=1
- +11 IF $DATA(DTOUT)!($DATA(DUOUT))
- QUIT
- +12 SET EDATE=Y
- +13 IF $EXTRACT(Y,6,7)="00"
- WRITE $CHAR(7)," ?? Enter exact date"
- GOTO EDATE
- +14 KILL DIRUT,DTOUT,DUOUT
- +15 QUIT
- +16 ;
- BDHELP ;Write the beginning date help.
- +1 WRITE !!,"This is the beginning date and time for "_TYPE_"S that should be scanned"
- +2 WRITE !,"for errors."
- +3 QUIT
- +4 ;
- EDHELP ;Write the ending date help.
- +1 WRITE !!,"This is the ending date and time for "_TYPE_"S that should be scanned"
- +2 WRITE !,"for errors."
- +3 QUIT
- +4 ;
- +5 ;=======================================================================
- EN(BEN,EEN) ;Error number range.
- BENUM ;Beginning error number.
- +1 ;Find the beginning and ending error numbers for the prompt.
- +2 NEW TBEN,TEEN
- +3 SET TBEN=$ORDER(^PX(839.01,0))
- +4 IF TBEN=""
- Begin DoDot:1
- +5 SET (BEN,EEN)=0
- End DoDot:1
- QUIT
- +6 SET TEEN=$ORDER(^PX(839.01,"A"),-1)
- +7 ;
- +8 NEW X,Y
- +9 KILL DIRUT,DTOUT,DUOUT
- +10 SET DIR(0)="N^"_TBEN_":"_TEEN
- +11 SET DIR("A")="Enter the beginning error number"
- +12 SET DIR("B")=TBEN
- +13 SET DIR("??")=U_"D BENHELP^PXEDILUD"
- +14 WRITE !
- +15 DO ^DIR
- KILL DIR
- +16 IF Y=(U_U)
- SET DTOUT=1
- +17 IF $DATA(DTOUT)!($DATA(DUOUT))
- QUIT
- +18 SET BEN=Y
- +19 ;
- EENUM ;Ending error number.
- +1 SET DIR(0)="N^"_BEN_":"_TEEN
- +2 SET DIR("A")="Enter the ending error number"
- +3 SET DIR("B")=TEEN
- +4 SET DIR("??")=U_"D EENHELP^PXEDILUD"
- +5 WRITE !
- +6 DO ^DIR
- KILL DIR
- +7 IF $DATA(DUOUT)
- GOTO BENUM
- +8 IF Y=(U_U)
- SET DTOUT=1
- +9 IF $DATA(DTOUT)!($DATA(DUOUT))
- QUIT
- +10 SET EEN=Y
- +11 KILL DIRUT,DTOUT,DUOUT
- +12 QUIT
- +13 ;
- BENHELP ;Write the beginning error number help.
- +1 WRITE !!,"This is the beginning error number."
- +2 QUIT
- +3 ;
- EENHELP ;Write the ending error number help.
- +1 WRITE !!,"This is the ending error number. If it is equal to the beginning error"
- +2 WRITE !,"number then only one error number will be used. Otherwise all error numbers"
- +3 WRITE !,"in the range specified by the beginning and ending error numbers will be used."
- +4 QUIT
- +5 ;
- +6 ;=======================================================================
- PAT ;Patient
- +1 NEW DIC,X,Y
- +2 SET NPATIENT=0
- +3 SET DIC("A")="Select Patient: "
- +4 SET DIC("S")="I $D(^PX(839.01,""C"",Y))"
- NPAT SET DIC=2
- +1 IF NPATIENT>0
- SET DIC("A")="Select another Patient: "
- +2 SET DIC(0)="AEQMZ"
- +3 DO ^DIC
- +4 IF Y=-1
- GOTO DPAT
- +5 IF $DATA(DTOUT)!$DATA(DUOUT)
- QUIT
- +6 SET NPATIENT=NPATIENT+1
- +7 SET PATIENT(NPATIENT)=+$PIECE(Y,U,1)
- +8 GOTO NPAT
- +9 ;
- DPAT ;
- +1 QUIT
- +2 ;