[613] | 1 | PXRRFDSC ;ISL/PKR - PCE reports FD selection criteria routines. ;2/5/98
|
---|
| 2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**12,18,31**;Aug 12, 1996
|
---|
| 3 | ;
|
---|
| 4 | ;=======================================================================
|
---|
| 5 | DIAGSC ;Get the diagnosis screening criteria.
|
---|
| 6 | N TEMP,X,Y
|
---|
| 7 | K DIRUT,DTOUT,DUOUT
|
---|
| 8 | S DIR(0)="SAO"_U_"P:Primary Diagnosis Only;A:All Diagnoses (Primary and Secondary)"
|
---|
| 9 | S DIR("A")="Select PRIMARY DIAGNOSIS ONLY (P) or ALL DIAGNOSES (A): "
|
---|
| 10 | S DIR("B")="P"
|
---|
| 11 | S TEMP="If you want to count only the primary diagnosis for each encounter enter a 'P'."
|
---|
| 12 | S TEMP=TEMP_" To count ALL diagnoses enter an 'A'."
|
---|
| 13 | S DIR("?")=TEMP
|
---|
| 14 | W !
|
---|
| 15 | D ^DIR K DIR
|
---|
| 16 | I $D(DIROUT) S DTOUT=1
|
---|
| 17 | I $D(DTOUT)!($D(DUOUT)) Q
|
---|
| 18 | S PXRRFDDC=Y_U_Y(0)
|
---|
| 19 | Q
|
---|
| 20 | ;
|
---|
| 21 | ;=======================================================================
|
---|
| 22 | DMAX ;Get the maximum number of diagnoses to display in the report.
|
---|
| 23 | N X,Y
|
---|
| 24 | K DIRUT,DTOUT,DUOUT
|
---|
| 25 | S DIR(0)="NA"_U_1
|
---|
| 26 | S DIR("A")="Enter the maximum NUMBER OF DIAGNOSES to display in the report: "
|
---|
| 27 | S DIR("B")=10
|
---|
| 28 | S DIR("?")="Enter an integer greater than or equal to 1"
|
---|
| 29 | S DIR("??")=U_"D DMAXHELP^PXRRFDSC"
|
---|
| 30 | W !
|
---|
| 31 | D ^DIR K DIR
|
---|
| 32 | I $D(DIROUT) S DTOUT=1
|
---|
| 33 | I $D(DTOUT)!($D(DUOUT)) Q
|
---|
| 34 | S PXRRDMAX=Y
|
---|
| 35 | Q
|
---|
| 36 | ;
|
---|
| 37 | DMAXHELP ;?? help for DMAX.
|
---|
| 38 | W !!,"This is the maximum number of entries that will be displayed in the report."
|
---|
| 39 | W !,"If less than this number of entries are found then they all will be displayed."
|
---|
| 40 | W !,"The number of entries that are found are determined by a combination of the"
|
---|
| 41 | W !,"screening criteria and the data stored in PCE."
|
---|
| 42 | Q
|
---|
| 43 | ;
|
---|
| 44 | ;=======================================================================
|
---|
| 45 | RACE ;Get the race screening criteria.
|
---|
| 46 | N X,Y
|
---|
| 47 | S NRACE=0
|
---|
| 48 | S DIC("A")="Select patient race(s): "
|
---|
| 49 | GRACE K DIRUT,DTOUT,DUOUT
|
---|
| 50 | S DIC=10
|
---|
| 51 | S DIC(0)="AEMQZ"
|
---|
| 52 | I NRACE>0 S DIC("A")="Enter another race: "
|
---|
| 53 | W !
|
---|
| 54 | D ^DIC K DIC
|
---|
| 55 | I X=(U_U) S DTOUT=1
|
---|
| 56 | I $D(DIROUT) S DTOUT=1
|
---|
| 57 | I $D(DTOUT)!($D(DUOUT)) Q
|
---|
| 58 | I Y=-1 Q
|
---|
| 59 | S NRACE=NRACE+1
|
---|
| 60 | S PXRRRACE(NRACE)=Y
|
---|
| 61 | G GRACE
|
---|
| 62 | Q
|
---|
| 63 | ;
|
---|
| 64 | ;=======================================================================
|
---|
| 65 | SEX ;Get the sex screening criteria.
|
---|
| 66 | N X,Y
|
---|
| 67 | K DIRUT,DTOUT,DUOUT
|
---|
| 68 | S DIR(0)="SAO"_U_"M:MALE;F:FEMALE"
|
---|
| 69 | S DIR("A")="Report should be based on patient sex: "
|
---|
| 70 | S DIR("B")="M"
|
---|
| 71 | W !
|
---|
| 72 | D ^DIR K DIR
|
---|
| 73 | I $D(DIROUT) S DTOUT=1
|
---|
| 74 | I $D(DTOUT)!($D(DUOUT)) Q
|
---|
| 75 | S PXRRSEX=Y_U_Y(0)
|
---|
| 76 | Q
|
---|
| 77 | ;
|
---|