PXRMXSD ; SLC/PJH - Reminder Reports DIR Prompts; 06/05/2009
;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
;
BED(YESNO) ;Option to sort by inpatient location and bed
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")="Sort by Inpatient Location/Bed: "
S DIR("B")="N"
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(11)"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
I YESNO="Y" S YESNO="B"
Q
;
COMB(YESNO,LIT,DEF) ;Option to combine report
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")="Combined report for all "_LIT_" : "
S DIR("B")=DEF
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(9)"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
Q
;
DELIMSEL() ;Select DELIMITER CHARACTER
N X,Y,DC,DIR
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="S"_U_"C:Comma;"
S DIR(0)=DIR(0)_"M:Semicolon;"
S DIR(0)=DIR(0)_"L:Tilde;"
S DIR(0)=DIR(0)_"S:Space;"
S DIR(0)=DIR(0)_"T:Tab;"
S DIR(0)=DIR(0)_"U:Up arrow;"
S DIR("A")="Specify REPORT DELIMITER CHARACTER"
S DIR("B")="U"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(14)"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q ""
S DC=$S(Y="C":",",Y="M":";",Y="L":"~",Y="S":" ",Y="T":$C(9),Y="U":"^",1:"^")
Q DC
;
FUTURE(YESNO,PROMPT,NUM) ;Option to display all future appointments on detail report
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")=PROMPT
S DIR("B")="N"
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP("_NUM_")"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
Q
;
PREV(TYPE) ;Future Appts/Prior Encounters selection
N X,Y,DIR
S NREM=0
K DIROUT,DIRUT,DTOUT,DUOUT
I 'PXRMINP D
.S DIR(0)="S"_U_"P:Previous Encounters;"
.S DIR(0)=DIR(0)_"F:Future Appointments;"
.S DIR("A")="PREVIOUS ENCOUNTERS OR FUTURE APPOINTMENTS"
.S DIR("B")="P"
.S DIR("??")=U_"D HELP^PXRMXHLP(3)"
I PXRMINP D
.S DIR(0)="S"_U_"A:Admissions to Location in date range;"
.S DIR(0)=DIR(0)_"C:Current Inpatients;"
.S DIR("A")="CURRENT INPATIENTS OR ADMISSIONS"
.S DIR("B")="C"
.S DIR("??")=U_"D HELP^PXRMXHLP(7)"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S TYPE=Y
Q
;
PRIME(TYPE) ;Primary Provider patients only or All
N X,Y,DIR
S NREM=0
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="S"_U_"P:Primary care assigned patients only;"
S DIR(0)=DIR(0)_"A:All patients on list;"
S DIR("A")="PRIMARY CARE ONLY OR ALL"
S DIR("B")="P"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(4)"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S TYPE=Y
Q
;
REP(TYPE) ;Report type selection
N X,Y,DIR
S NREM=0
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="S"_U_"D:Detailed;"
S DIR(0)=DIR(0)_"S:Summary;"
S DIR("A")="TYPE OF REPORT"
S DIR("B")="S"
I PXRMSEL="I" S DIR("B")="D"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(2)"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S TYPE=Y
Q
;
SELECT(TYPE) ;Patient Sample Selection
N X,Y,DIR
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="S"_U_"I:Individual Patient;"
S DIR(0)=DIR(0)_"R:Reminder Patient List;"
S DIR(0)=DIR(0)_"L:Location;"
S DIR(0)=DIR(0)_"O:OE/RR Team;"
S DIR(0)=DIR(0)_"P:PCMM Provider;"
S DIR(0)=DIR(0)_"T:PCMM Team;"
S DIR("A")="PATIENT SAMPLE"
S DIR("B")="L"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(0)"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S TYPE=Y
Q
;
SEPCS(PXRMCCS) ;Allow users to determine the output of the Clinic Stops report
N DIR,TEXT,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S PXRMCCS=""
I PXRMREP="S",PXRMTOT="T" Q
;PXRMLCSC only defined if report is by Clinic Stops.
I $P($G(PXRMLCSC),U)'="CS" Q
S TEXT="C:Report by Clinic Stops Only;"
I PXRMREP="S" S TEXT=TEXT_"B:Report by Clinic Stops and Individual Clinic(s);"
S TEXT=TEXT_"I:Report by Individual Clinic(s)"
S DIR(0)="S"_U_TEXT
S DIR("A")="Clinic Stops output"
S DIR("B")="C"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S PXRMCCS=Y
Q
;
SRT(YESNO) ;Option to sort by next appointment date on detail report
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")="Sort by Next Appointment date: "
S DIR("B")="N"
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(6)"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
Q
;
SSN(YESNO) ;Option to print full SSN.
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")="Print full SSN: "
I $P($G(^PXRM(800,1,"FULL SSN")),U)="Y" S DIR("B")="Y"
E S DIR("B")="N"
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(12)"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
Q
;
TABS(YESNO) ;Option print compressed report
N DIR,X,Y
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="YA"
S DIR("A")="Print delimited output only: "
S DIR("B")="N"
S DIR("?")="Enter Y or N. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(13)"
W !
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S YESNO=$E(Y(0))
Q
;
TOTALS(TYPE,LIT1,LIT2,LIT3) ;Totals Selection
N X,Y,DIR
K DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="S"_U_"I:"_LIT1_";"
S DIR(0)=DIR(0)_"R:"_LIT2_";"
S DIR(0)=DIR(0)_"T:"_LIT3_";"
S DIR("A")="REPORT TOTALS"
S DIR("B")="I"
S DIR("?")="Select from the codes displayed. For detailed help type ??"
S DIR("??")=U_"D HELP^PXRMXHLP(10)"
D ^DIR
I $D(DIROUT) S DTOUT=1
I $D(DTOUT)!($D(DUOUT)) Q
S TYPE=Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMXSD 6087 printed Oct 16, 2024@17:51:09 Page 2
PXRMXSD ; SLC/PJH - Reminder Reports DIR Prompts; 06/05/2009
+1 ;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
+2 ;
BED(YESNO) ;Option to sort by inpatient location and bed
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")="Sort by Inpatient Location/Bed: "
+5 SET DIR("B")="N"
+6 SET DIR("?")="Enter Y or N. For detailed help type ??"
+7 SET DIR("??")=U_"D HELP^PXRMXHLP(11)"
+8 WRITE !
+9 DO ^DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET YESNO=$EXTRACT(Y(0))
+13 IF YESNO="Y"
SET YESNO="B"
+14 QUIT
+15 ;
COMB(YESNO,LIT,DEF) ;Option to combine report
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")="Combined report for all "_LIT_" : "
+5 SET DIR("B")=DEF
+6 SET DIR("?")="Enter Y or N. For detailed help type ??"
+7 SET DIR("??")=U_"D HELP^PXRMXHLP(9)"
+8 WRITE !
+9 DO ^DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET YESNO=$EXTRACT(Y(0))
+13 QUIT
+14 ;
DELIMSEL() ;Select DELIMITER CHARACTER
+1 NEW X,Y,DC,DIR
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="S"_U_"C:Comma;"
+4 SET DIR(0)=DIR(0)_"M:Semicolon;"
+5 SET DIR(0)=DIR(0)_"L:Tilde;"
+6 SET DIR(0)=DIR(0)_"S:Space;"
+7 SET DIR(0)=DIR(0)_"T:Tab;"
+8 SET DIR(0)=DIR(0)_"U:Up arrow;"
+9 SET DIR("A")="Specify REPORT DELIMITER CHARACTER"
+10 SET DIR("B")="U"
+11 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+12 SET DIR("??")=U_"D HELP^PXRMXHLP(14)"
+13 DO ^DIR
+14 IF $DATA(DIROUT)
SET DTOUT=1
+15 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT ""
+16 SET DC=$SELECT(Y="C":",",Y="M":";",Y="L":"~",Y="S":" ",Y="T":$CHAR(9),Y="U":"^",1:"^")
+17 QUIT DC
+18 ;
FUTURE(YESNO,PROMPT,NUM) ;Option to display all future appointments on detail report
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")=PROMPT
+5 SET DIR("B")="N"
+6 SET DIR("?")="Enter Y or N. For detailed help type ??"
+7 SET DIR("??")=U_"D HELP^PXRMXHLP("_NUM_")"
+8 WRITE !
+9 DO ^DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET YESNO=$EXTRACT(Y(0))
+13 QUIT
+14 ;
PREV(TYPE) ;Future Appts/Prior Encounters selection
+1 NEW X,Y,DIR
+2 SET NREM=0
+3 KILL DIROUT,DIRUT,DTOUT,DUOUT
+4 IF 'PXRMINP
Begin DoDot:1
+5 SET DIR(0)="S"_U_"P:Previous Encounters;"
+6 SET DIR(0)=DIR(0)_"F:Future Appointments;"
+7 SET DIR("A")="PREVIOUS ENCOUNTERS OR FUTURE APPOINTMENTS"
+8 SET DIR("B")="P"
+9 SET DIR("??")=U_"D HELP^PXRMXHLP(3)"
End DoDot:1
+10 IF PXRMINP
Begin DoDot:1
+11 SET DIR(0)="S"_U_"A:Admissions to Location in date range;"
+12 SET DIR(0)=DIR(0)_"C:Current Inpatients;"
+13 SET DIR("A")="CURRENT INPATIENTS OR ADMISSIONS"
+14 SET DIR("B")="C"
+15 SET DIR("??")=U_"D HELP^PXRMXHLP(7)"
End DoDot:1
+16 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+17 DO ^DIR
+18 IF $DATA(DIROUT)
SET DTOUT=1
+19 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+20 SET TYPE=Y
+21 QUIT
+22 ;
PRIME(TYPE) ;Primary Provider patients only or All
+1 NEW X,Y,DIR
+2 SET NREM=0
+3 KILL DIROUT,DIRUT,DTOUT,DUOUT
+4 SET DIR(0)="S"_U_"P:Primary care assigned patients only;"
+5 SET DIR(0)=DIR(0)_"A:All patients on list;"
+6 SET DIR("A")="PRIMARY CARE ONLY OR ALL"
+7 SET DIR("B")="P"
+8 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+9 SET DIR("??")=U_"D HELP^PXRMXHLP(4)"
+10 DO ^DIR
+11 IF $DATA(DIROUT)
SET DTOUT=1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+13 SET TYPE=Y
+14 QUIT
+15 ;
REP(TYPE) ;Report type selection
+1 NEW X,Y,DIR
+2 SET NREM=0
+3 KILL DIROUT,DIRUT,DTOUT,DUOUT
+4 SET DIR(0)="S"_U_"D:Detailed;"
+5 SET DIR(0)=DIR(0)_"S:Summary;"
+6 SET DIR("A")="TYPE OF REPORT"
+7 SET DIR("B")="S"
+8 IF PXRMSEL="I"
SET DIR("B")="D"
+9 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+10 SET DIR("??")=U_"D HELP^PXRMXHLP(2)"
+11 DO ^DIR
+12 IF $DATA(DIROUT)
SET DTOUT=1
+13 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+14 SET TYPE=Y
+15 QUIT
+16 ;
SELECT(TYPE) ;Patient Sample Selection
+1 NEW X,Y,DIR
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="S"_U_"I:Individual Patient;"
+4 SET DIR(0)=DIR(0)_"R:Reminder Patient List;"
+5 SET DIR(0)=DIR(0)_"L:Location;"
+6 SET DIR(0)=DIR(0)_"O:OE/RR Team;"
+7 SET DIR(0)=DIR(0)_"P:PCMM Provider;"
+8 SET DIR(0)=DIR(0)_"T:PCMM Team;"
+9 SET DIR("A")="PATIENT SAMPLE"
+10 SET DIR("B")="L"
+11 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+12 SET DIR("??")=U_"D HELP^PXRMXHLP(0)"
+13 DO ^DIR
+14 IF $DATA(DIROUT)
SET DTOUT=1
+15 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+16 SET TYPE=Y
+17 QUIT
+18 ;
SEPCS(PXRMCCS) ;Allow users to determine the output of the Clinic Stops report
+1 NEW DIR,TEXT,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET PXRMCCS=""
+4 IF PXRMREP="S"
IF PXRMTOT="T"
QUIT
+5 ;PXRMLCSC only defined if report is by Clinic Stops.
+6 IF $PIECE($GET(PXRMLCSC),U)'="CS"
QUIT
+7 SET TEXT="C:Report by Clinic Stops Only;"
+8 IF PXRMREP="S"
SET TEXT=TEXT_"B:Report by Clinic Stops and Individual Clinic(s);"
+9 SET TEXT=TEXT_"I:Report by Individual Clinic(s)"
+10 SET DIR(0)="S"_U_TEXT
+11 SET DIR("A")="Clinic Stops output"
+12 SET DIR("B")="C"
+13 DO ^DIR
+14 IF $DATA(DIROUT)
SET DTOUT=1
+15 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+16 SET PXRMCCS=Y
+17 QUIT
+18 ;
SRT(YESNO) ;Option to sort by next appointment date on detail report
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")="Sort by Next Appointment date: "
+5 SET DIR("B")="N"
+6 SET DIR("?")="Enter Y or N. For detailed help type ??"
+7 SET DIR("??")=U_"D HELP^PXRMXHLP(6)"
+8 WRITE !
+9 DO ^DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET YESNO=$EXTRACT(Y(0))
+13 QUIT
+14 ;
SSN(YESNO) ;Option to print full SSN.
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")="Print full SSN: "
+5 IF $PIECE($GET(^PXRM(800,1,"FULL SSN")),U)="Y"
SET DIR("B")="Y"
+6 IF '$TEST
SET DIR("B")="N"
+7 SET DIR("?")="Enter Y or N. For detailed help type ??"
+8 SET DIR("??")=U_"D HELP^PXRMXHLP(12)"
+9 WRITE !
+10 DO ^DIR
+11 IF $DATA(DIROUT)
SET DTOUT=1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+13 SET YESNO=$EXTRACT(Y(0))
+14 QUIT
+15 ;
TABS(YESNO) ;Option print compressed report
+1 NEW DIR,X,Y
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="YA"
+4 SET DIR("A")="Print delimited output only: "
+5 SET DIR("B")="N"
+6 SET DIR("?")="Enter Y or N. For detailed help type ??"
+7 SET DIR("??")=U_"D HELP^PXRMXHLP(13)"
+8 WRITE !
+9 DO ^DIR
+10 IF $DATA(DIROUT)
SET DTOUT=1
+11 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+12 SET YESNO=$EXTRACT(Y(0))
+13 QUIT
+14 ;
TOTALS(TYPE,LIT1,LIT2,LIT3) ;Totals Selection
+1 NEW X,Y,DIR
+2 KILL DIROUT,DIRUT,DTOUT,DUOUT
+3 SET DIR(0)="S"_U_"I:"_LIT1_";"
+4 SET DIR(0)=DIR(0)_"R:"_LIT2_";"
+5 SET DIR(0)=DIR(0)_"T:"_LIT3_";"
+6 SET DIR("A")="REPORT TOTALS"
+7 SET DIR("B")="I"
+8 SET DIR("?")="Select from the codes displayed. For detailed help type ??"
+9 SET DIR("??")=U_"D HELP^PXRMXHLP(10)"
+10 DO ^DIR
+11 IF $DATA(DIROUT)
SET DTOUT=1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+13 SET TYPE=Y
+14 QUIT