GMPLPRF0 ; SLC/MKB -- Problem List User Prefs cont ;;9-5-95 11:54am
;;2.0;Problem List;**3**;Aug 25, 1994
CURRENT(USER) ; Show user's current preference
N VIEW,NUM W !!,"CURRENT VIEW: "
S VIEW=$P($G(^VA(200,USER,125)),U),NUM=$S($L(VIEW,"/")<3:"all",1:$L(VIEW,"/")-2)
I $E(VIEW)="S" W "Inpatient, "_NUM_" services included",! Q
I $E(VIEW)="C" W "Outpatient, "_NUM_" clinics included",! Q
W "None defined",!," (Default is outpatient, all clinics included)",!
Q
;
CHANGE() ; Want to change preferred view?
N DIR,X,Y S DIR(0)="YA",DIR("B")="NO"
S DIR("A")="Do you want to change your preferred view? "
S DIR("?",1)="Enter YES if you want to change your preferred view of patient",DIR("?",2)="problem lists; NO will exit this option, leaving your view unchanged."
S DIR("?",3)="Your preferred view will determine what information you see about",DIR("?")="each problem, and whether you see a complete or partial list."
D ^DIR
Q +Y
;
VIEW(MODE) ; Returns user's preferred view, by 'S'ervice or 'C'linic
N DIR,X,Y S DIR("B")=$S(MODE="S":"INPATIENT",1:"OUTPATIENT")
S DIR(0)="SAOM^C:OUTPATIENT;S:INPATIENT;",DIR("A")="Select VIEW: "
S DIR("?",1)="Choose from: Outpatient"
S DIR("?",2)=" Inpatient"
S DIR("?",3)="An OUTPATIENT view will display information regarding the clinic that",DIR("?",4)="is following each problem; an INPATIENT view will display service and",DIR("?")="responsible provider information."
D ^DIR S:$D(DTOUT)!($D(DUOUT)) Y="^"
Q Y
;
ALL(MODE,DEFLT) ; Include all problems, or select from clinics/services?
N DIR,X,Y
S DIR(0)="SAOM^A:ALL;S:SELECTED;",DIR("B")=$S(DEFLT<3:"ALL",1:"SELECTED")
S DIR("A")="Include (A)ll problems or only those from (S)elected "_$S(MODE="S":"services",1:"clinics")_"? "
S DIR("?",1)="Enter A to display all active problems for the selected patient, or S to",DIR("?",2)="see a partial list. You may select specific "_$S(MODE="S":"inpatient services",1:"outpatient clinics")_", and only"
S DIR("?",3)="those problems associated with them will be shown at first; the remainder",DIR("?",4)="of the patient's problems are always available to display through the",DIR("?")="""Select View"" action."
D ^DIR S:$D(DTOUT)!($D(DUOUT)) Y="^" S:Y="A" Y=1 S:Y="S" Y=0
Q Y
GMPLPRF0 ; SLC/MKB -- Problem List User Prefs cont ;;9-5-95 11:54am
+1 ;;2.0;Problem List;**3**;Aug 25, 1994
CURRENT(USER) ; Show user's current preference
+1 NEW VIEW,NUM
WRITE !!,"CURRENT VIEW: "
+2 SET VIEW=$PIECE($GET(^VA(200,USER,125)),U)
SET NUM=$SELECT($LENGTH(VIEW,"/")<3:"all",1:$LENGTH(VIEW,"/")-2)
+3 IF $EXTRACT(VIEW)="S"
WRITE "Inpatient, "_NUM_" services included",!
QUIT
+4 IF $EXTRACT(VIEW)="C"
WRITE "Outpatient, "_NUM_" clinics included",!
QUIT
+5 WRITE "None defined",!," (Default is outpatient, all clinics included)",!
+6 QUIT
+7 ;
CHANGE() ; Want to change preferred view?
+1 NEW DIR,X,Y
SET DIR(0)="YA"
SET DIR("B")="NO"
+2 SET DIR("A")="Do you want to change your preferred view? "
+3 SET DIR("?",1)="Enter YES if you want to change your preferred view of patient"
SET DIR("?",2)="problem lists; NO will exit this option, leaving your view unchanged."
+4 SET DIR("?",3)="Your preferred view will determine what information you see about"
SET DIR("?")="each problem, and whether you see a complete or partial list."
+5 DO ^DIR
+6 QUIT +Y
+7 ;
VIEW(MODE) ; Returns user's preferred view, by 'S'ervice or 'C'linic
+1 NEW DIR,X,Y
SET DIR("B")=$SELECT(MODE="S":"INPATIENT",1:"OUTPATIENT")
+2 SET DIR(0)="SAOM^C:OUTPATIENT;S:INPATIENT;"
SET DIR("A")="Select VIEW: "
+3 SET DIR("?",1)="Choose from: Outpatient"
+4 SET DIR("?",2)=" Inpatient"
+5 SET DIR("?",3)="An OUTPATIENT view will display information regarding the clinic that"
SET DIR("?",4)="is following each problem; an INPATIENT view will display service and"
SET DIR("?")="responsible provider information."
+6 DO ^DIR
IF $DATA(DTOUT)!($DATA(DUOUT))
SET Y="^"
+7 QUIT Y
+8 ;
ALL(MODE,DEFLT) ; Include all problems, or select from clinics/services?
+1 NEW DIR,X,Y
+2 SET DIR(0)="SAOM^A:ALL;S:SELECTED;"
SET DIR("B")=$SELECT(DEFLT<3:"ALL",1:"SELECTED")
+3 SET DIR("A")="Include (A)ll problems or only those from (S)elected "_$SELECT(MODE="S":"services",1:"clinics")_"? "
+4 SET DIR("?",1)="Enter A to display all active problems for the selected patient, or S to"
SET DIR("?",2)="see a partial list. You may select specific "_$SELECT(MODE="S":"inpatient services",1:"outpatient clinics")_", and only"
+5 SET DIR("?",3)="those problems associated with them will be shown at first; the remainder"
SET DIR("?",4)="of the patient's problems are always available to display through the"
SET DIR("?")="""Select View"" action."
+6 DO ^DIR
IF $DATA(DTOUT)!($DATA(DUOUT))
SET Y="^"
IF Y="A"
SET Y=1
IF Y="S"
SET Y=0
+7 QUIT Y