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

PXEDILUD.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ;=======================================================================
  1. DT(BDATE,EDATE,TYPE) ;Date and time range.
  1. BDATE ;Select the beginning date.
  1. N X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. S DIR(0)="D^:DT:EPTX"
  1. S DIR("A")="Enter beginning "_TYPE_" date and time"
  1. S DIR("??")=U_"D BDHELP^PXEDILUD"
  1. W !
  1. D ^DIR K DIR
  1. I Y=(U_U) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. S BDATE=Y
  1. I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G BDATE
  1. ;
  1. EDATE ;Select the ending date.
  1. N NOW
  1. S NOW=$$FMTE^XLFDT($$NOW^XLFDT,"1")
  1. S DIR(0)="D^"_BDATE_":NOW:ESTX"
  1. S DIR("A")="Enter the ending "_TYPE_" date and time"
  1. S DIR("B")=NOW
  1. S DIR("??")=U_"D EDHELP^PXEDILUD"
  1. W !
  1. D ^DIR K DIR
  1. I $D(DUOUT) G BDATE
  1. I Y=(U_U) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. S EDATE=Y
  1. I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G EDATE
  1. K DIRUT,DTOUT,DUOUT
  1. Q
  1. ;
  1. BDHELP ;Write the beginning date help.
  1. W !!,"This is the beginning date and time for "_TYPE_"S that should be scanned"
  1. W !,"for errors."
  1. Q
  1. ;
  1. EDHELP ;Write the ending date help.
  1. W !!,"This is the ending date and time for "_TYPE_"S that should be scanned"
  1. W !,"for errors."
  1. Q
  1. ;
  1. ;=======================================================================
  1. EN(BEN,EEN) ;Error number range.
  1. BENUM ;Beginning error number.
  1. ;Find the beginning and ending error numbers for the prompt.
  1. N TBEN,TEEN
  1. S TBEN=$O(^PX(839.01,0))
  1. I TBEN="" D Q
  1. . S (BEN,EEN)=0
  1. S TEEN=$O(^PX(839.01,"A"),-1)
  1. ;
  1. N X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. S DIR(0)="N^"_TBEN_":"_TEEN
  1. S DIR("A")="Enter the beginning error number"
  1. S DIR("B")=TBEN
  1. S DIR("??")=U_"D BENHELP^PXEDILUD"
  1. W !
  1. D ^DIR K DIR
  1. I Y=(U_U) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. S BEN=Y
  1. ;
  1. EENUM ;Ending error number.
  1. S DIR(0)="N^"_BEN_":"_TEEN
  1. S DIR("A")="Enter the ending error number"
  1. S DIR("B")=TEEN
  1. S DIR("??")=U_"D EENHELP^PXEDILUD"
  1. W !
  1. D ^DIR K DIR
  1. I $D(DUOUT) G BENUM
  1. I Y=(U_U) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. S EEN=Y
  1. K DIRUT,DTOUT,DUOUT
  1. Q
  1. ;
  1. BENHELP ;Write the beginning error number help.
  1. W !!,"This is the beginning error number."
  1. Q
  1. ;
  1. EENHELP ;Write the ending error number help.
  1. W !!,"This is the ending error number. If it is equal to the beginning error"
  1. W !,"number then only one error number will be used. Otherwise all error numbers"
  1. W !,"in the range specified by the beginning and ending error numbers will be used."
  1. Q
  1. ;
  1. ;=======================================================================
  1. PAT ;Patient
  1. N DIC,X,Y
  1. S NPATIENT=0
  1. S DIC("A")="Select Patient: "
  1. S DIC("S")="I $D(^PX(839.01,""C"",Y))"
  1. NPAT S DIC=2
  1. I NPATIENT>0 S DIC("A")="Select another Patient: "
  1. S DIC(0)="AEQMZ"
  1. D ^DIC
  1. I Y=-1 G DPAT
  1. I $D(DTOUT)!$D(DUOUT) Q
  1. S NPATIENT=NPATIENT+1
  1. S PATIENT(NPATIENT)=+$P(Y,U,1)
  1. G NPAT
  1. ;
  1. DPAT ;
  1. Q
  1. ;