PXRRFDSC ;ISL/PKR - PCE reports FD selection criteria routines. ;2/5/98
;;1.0;PCE PATIENT CARE ENCOUNTER;**12,18,31**;Aug 12, 1996
;
;=======================================================================
DIAGSC ;Get the diagnosis screening criteria.
N TEMP,X,Y
K DIRUT,DTOUT,DUOUT
S DIR(0)="SAO"_U_"P:Primary Diagnosis Only;A:All Diagnoses (Primary and Secondary)"
S DIR("A")="Select PRIMARY DIAGNOSIS ONLY (P) or ALL DIAGNOSES (A): "
S DIR("B")="P"
S TEMP="If you want to count only the primary diagnosis for each encounter enter a 'P'."
S TEMP=TEMP_" To count ALL diagnoses enter an 'A'."
S DIR("?")=TEMP
W !
D ^DIR K DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S PXRRFDDC=Y_U_Y(0)
Q
;
;=======================================================================
DMAX ;Get the maximum number of diagnoses to display in the report.
N X,Y
K DIRUT,DTOUT,DUOUT
S DIR(0)="NA"_U_1
S DIR("A")="Enter the maximum NUMBER OF DIAGNOSES to display in the report: "
S DIR("B")=10
S DIR("?")="Enter an integer greater than or equal to 1"
S DIR("??")=U_"D DMAXHELP^PXRRFDSC"
W !
D ^DIR K DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S PXRRDMAX=Y
Q
;
DMAXHELP ;?? help for DMAX.
W !!,"This is the maximum number of entries that will be displayed in the report."
W !,"If less than this number of entries are found then they all will be displayed."
W !,"The number of entries that are found are determined by a combination of the"
W !,"screening criteria and the data stored in PCE."
Q
;
;=======================================================================
RACE ;Get the race screening criteria.
N X,Y
S NRACE=0
S DIC("A")="Select patient race(s): "
GRACE K DIRUT,DTOUT,DUOUT
S DIC=10
S DIC(0)="AEMQZ"
I NRACE>0 S DIC("A")="Enter another race: "
W !
D ^DIC K DIC
I X=(U_U) S DTOUT=1
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
I Y=-1 Q
S NRACE=NRACE+1
S PXRRRACE(NRACE)=Y
G GRACE
Q
;
;=======================================================================
SEX ;Get the sex screening criteria.
N X,Y
K DIRUT,DTOUT,DUOUT
S DIR(0)="SAO"_U_"M:MALE;F:FEMALE"
S DIR("A")="Report should be based on patient sex: "
S DIR("B")="M"
W !
D ^DIR K DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S PXRRSEX=Y_U_Y(0)
Q
;
PXRRFDSC ;ISL/PKR - PCE reports FD selection criteria routines. ;2/5/98
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**12,18,31**;Aug 12, 1996
+2 ;
+3 ;=======================================================================
DIAGSC ;Get the diagnosis screening criteria.
+1 NEW TEMP,X,Y
+2 KILL DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="SAO"_U_"P:Primary Diagnosis Only;A:All Diagnoses (Primary and Secondary)"
+4 SET DIR("A")="Select PRIMARY DIAGNOSIS ONLY (P) or ALL DIAGNOSES (A): "
+5 SET DIR("B")="P"
+6 SET TEMP="If you want to count only the primary diagnosis for each encounter enter a 'P'."
+7 SET TEMP=TEMP_" To count ALL diagnoses enter an 'A'."
+8 SET DIR("?")=TEMP
+9 WRITE !
+10 DO ^DIR
KILL DIR
+11 IF $DATA(DIROUT)
SET DTOUT=1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+13 SET PXRRFDDC=Y_U_Y(0)
+14 QUIT
+15 ;
+16 ;=======================================================================
DMAX ;Get the maximum number of diagnoses to display in the report.
+1 NEW X,Y
+2 KILL DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="NA"_U_1
+4 SET DIR("A")="Enter the maximum NUMBER OF DIAGNOSES to display in the report: "
+5 SET DIR("B")=10
+6 SET DIR("?")="Enter an integer greater than or equal to 1"
+7 SET DIR("??")=U_"D DMAXHELP^PXRRFDSC"
+8 WRITE !
+9 DO ^DIR
KILL DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET PXRRDMAX=Y
+13 QUIT
+14 ;
DMAXHELP ;?? help for DMAX.
+1 WRITE !!,"This is the maximum number of entries that will be displayed in the report."
+2 WRITE !,"If less than this number of entries are found then they all will be displayed."
+3 WRITE !,"The number of entries that are found are determined by a combination of the"
+4 WRITE !,"screening criteria and the data stored in PCE."
+5 QUIT
+6 ;
+7 ;=======================================================================
RACE ;Get the race screening criteria.
+1 NEW X,Y
+2 SET NRACE=0
+3 SET DIC("A")="Select patient race(s): "
GRACE KILL DIRUT,DTOUT,DUOUT
+1 SET DIC=10
+2 SET DIC(0)="AEMQZ"
+3 IF NRACE>0
SET DIC("A")="Enter another race: "
+4 WRITE !
+5 DO ^DIC
KILL DIC
+6 IF X=(U_U)
SET DTOUT=1
+7 IF $DATA(DIROUT)
SET DTOUT=1
+8 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+9 IF Y=-1
QUIT
+10 SET NRACE=NRACE+1
+11 SET PXRRRACE(NRACE)=Y
+12 GOTO GRACE
+13 QUIT
+14 ;
+15 ;=======================================================================
SEX ;Get the sex screening criteria.
+1 NEW X,Y
+2 KILL DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="SAO"_U_"M:MALE;F:FEMALE"
+4 SET DIR("A")="Report should be based on patient sex: "
+5 SET DIR("B")="M"
+6 WRITE !
+7 DO ^DIR
KILL DIR
+8 IF $DATA(DIROUT)
SET DTOUT=1
+9 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+10 SET PXRRSEX=Y_U_Y(0)
+11 QUIT
+12 ;