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

PXRMXSD.m

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