- OROTHBTN ;SLC/SS/RM/JC - OTH LOCAL MESSAGE ; 02/19/2021 09:11
- ;;3.0;ORDER ENTRY/RESULTS REPORTING;**546**;Dec 17, 1997;Build 24
- ;
- ; ICR# TYPE DESCRIPTION
- ; ---------------------------------
- ; 2685 PRI OE/RR Direct Access to File ^XTV(8989.51
- ;
- Q
- LOCMSG ; Add/Edit Local Message on OTH Button
- N LOCMSG1,LOCMSG2,DIE,DA,DR,ARRAY,ARRAY2,DIC,X,LOCIEN,LOCDFLT
- S LOCDFLT="Call Registration Team for Details. "
- S DIC="^XTV(8989.51,",DIC(0)="QEZ",X="OR OTH BTN LOCAL MSG"
- D ^DIC
- S LOCIEN=$P($G(Y),"^")
- D GETS^DIQ(8989.51,LOCIEN_",","**","","ARRAY")
- W #!,"Add/Edit Text for Display in OTH Button in CPRS",!
- W "-----------------------------------------------",!
- W "The text 'Call Registration Team for Details.' will always be displayed."
- W !,"It cannot be edited or deleted.",!
- W !,"All messages will display like this:"
- W !,"Call Registration Team for Details. Optional Line 1"
- W !,"Optional Line 2"
- W !!,"Current Local Message: ",!
- S LOCMSG1=$G(ARRAY(8989.51,LOCIEN_",","20",1))
- S LOCMSG2=$G(ARRAY(8989.51,LOCIEN_",","20",2))
- W $G(LOCDFLT)_$G(LOCMSG1),!
- W $G(LOCMSG2),!
- LOCLINE ; Return here if input is too long
- N LOCREAD1,LOCREAD2,LOCKEEP,LOCMSG,DIR,DTOUT,DUOUT
- N LOCNO
- S LOCNO=0,DTIME=$S($G(DTIME)>300:300,1:$G(DTIME))
- W !!
- S DIR(0)="FAO^0:24",DIR("A")=" Enter Line 1 (optional, 24 char max): "
- S DIR("B")=$G(LOCMSG1)
- S DIR("T")=60
- S DIR("?")="Enter up to 24 characters. "
- S DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
- S DIR("?",2)="regardless of whether the user enters any further lines of data."
- S DIR("?",3)="It cannot be edited or deleted."
- S DIR("?",4)="You may optionally enter or edit text to display in CPRS."
- S DIR("?",5)="Line 1 has a maximum of 24 characters."
- S DIR("??")="^D HELP^OROTHBTN"
- D ^DIR
- I $D(DUOUT)!($D(DTOUT)) Q
- S LOCREAD1=$G(X)
- I $G(LOCREAD1)="^" Q
- I $G(LOCREAD1)="@" S LOCREAD1="",LOCNO=$$REMOVE(1,.LOCMSG)
- I $G(LOCNO)=0,$G(X)="@" S LOCREAD1=$G(LOCMSG1)
- LOCLINE2 ;
- N DIR,LOCNO2,DTOUT,DUOUT
- S (LOCNO,LOCNO2)=0,DTIME=$S($G(DTIME)>300:300,1:$G(DTIME))
- W !!
- S DIR(0)="FAO^0:70",DIR("A")=" Enter Line 2 (optional, 70 char max): "
- S DIR("B")=$G(LOCMSG2)
- S DIR("T")=60
- S DIR("?")="Enter up to 70 characters. "
- S DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
- S DIR("?",2)="regardless of whether the user enters any further lines of data."
- S DIR("?",3)="It cannot be edited or deleted."
- S DIR("?",4)="You may optionally enter or edit text to display in CPRS."
- S DIR("?",5)="Line 2 has a maximum of 70 characters."
- S DIR("??")="^D HELP^OROTHBTN"
- D ^DIR
- I $D(DUOUT)!($D(DTOUT)) Q
- S LOCREAD2=$G(X)
- I $G(LOCREAD2)="^" Q
- I $G(LOCREAD2)="@" S LOCREAD2="",LOCNO2=$$REMOVE(2,.LOCMSG)
- I $G(LOCNO2)=0,$G(X)="@" S LOCREAD2=$G(LOCMSG2)
- W !
- S LOCMSG(1)=$G(LOCREAD1)
- S LOCMSG(2)=$G(LOCREAD2)
- D WP^DIE(8989.51,LOCIEN_",",20,"","LOCMSG","DGMTERR")
- Q
- ;
- HELP ; Long help text for ??
- W !,""
- W !,"The text 'Call Registration Team for Details.' will be displayed"
- W !,"regardless of whether the user enters any further lines of data."
- W !,"It cannot be edited or deleted."
- W !
- W !,"You may optionally add up to 2 additional lines of text"
- W !,"to be displayed in the OTH button in CPRS when it is"
- W !,"populated for a patient."
- W !
- W !,"Line 1 has a maximum of 24 characters."
- W !,"If a value is given for Line 1, it will be concatenated to the end"
- W !,"of 'Call Registration Team for Details.'"
- W !!,"Line 2 has a maximum of 70 characters."
- W !!,"All messages will display like this:"
- W !,"Call Registration Team for Details. Optional Line 1"
- W !,"Optional Line 2"
- Q
- ;
- REMOVE(LINE,LOCMSG) ;-- sure you want to delete?
- N X,Y,DIR,DA
- S DIR(0)="YA",DIR("A")=" Are you sure you want to delete this line? "
- S DIR("B")="NO" W $C(7)
- D ^DIR
- S X=$$UP^XLFSTR(X)
- I $G(X)="N"!($G(X)="NO") S LOCNO=0
- I $G(X)="Y"!($G(X)="YES") S LOCNO=1
- Q LOCNO
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOROTHBTN 4013 printed Feb 18, 2025@23:58:54 Page 2
- OROTHBTN ;SLC/SS/RM/JC - OTH LOCAL MESSAGE ; 02/19/2021 09:11
- +1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**546**;Dec 17, 1997;Build 24
- +2 ;
- +3 ; ICR# TYPE DESCRIPTION
- +4 ; ---------------------------------
- +5 ; 2685 PRI OE/RR Direct Access to File ^XTV(8989.51
- +6 ;
- +7 QUIT
- LOCMSG ; Add/Edit Local Message on OTH Button
- +1 NEW LOCMSG1,LOCMSG2,DIE,DA,DR,ARRAY,ARRAY2,DIC,X,LOCIEN,LOCDFLT
- +2 SET LOCDFLT="Call Registration Team for Details. "
- +3 SET DIC="^XTV(8989.51,"
- SET DIC(0)="QEZ"
- SET X="OR OTH BTN LOCAL MSG"
- +4 DO ^DIC
- +5 SET LOCIEN=$PIECE($GET(Y),"^")
- +6 DO GETS^DIQ(8989.51,LOCIEN_",","**","","ARRAY")
- +7 WRITE #!,"Add/Edit Text for Display in OTH Button in CPRS",!
- +8 WRITE "-----------------------------------------------",!
- +9 WRITE "The text 'Call Registration Team for Details.' will always be displayed."
- +10 WRITE !,"It cannot be edited or deleted.",!
- +11 WRITE !,"All messages will display like this:"
- +12 WRITE !,"Call Registration Team for Details. Optional Line 1"
- +13 WRITE !,"Optional Line 2"
- +14 WRITE !!,"Current Local Message: ",!
- +15 SET LOCMSG1=$GET(ARRAY(8989.51,LOCIEN_",","20",1))
- +16 SET LOCMSG2=$GET(ARRAY(8989.51,LOCIEN_",","20",2))
- +17 WRITE $GET(LOCDFLT)_$GET(LOCMSG1),!
- +18 WRITE $GET(LOCMSG2),!
- LOCLINE ; Return here if input is too long
- +1 NEW LOCREAD1,LOCREAD2,LOCKEEP,LOCMSG,DIR,DTOUT,DUOUT
- +2 NEW LOCNO
- +3 SET LOCNO=0
- SET DTIME=$SELECT($GET(DTIME)>300:300,1:$GET(DTIME))
- +4 WRITE !!
- +5 SET DIR(0)="FAO^0:24"
- SET DIR("A")=" Enter Line 1 (optional, 24 char max): "
- +6 SET DIR("B")=$GET(LOCMSG1)
- +7 SET DIR("T")=60
- +8 SET DIR("?")="Enter up to 24 characters. "
- +9 SET DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
- +10 SET DIR("?",2)="regardless of whether the user enters any further lines of data."
- +11 SET DIR("?",3)="It cannot be edited or deleted."
- +12 SET DIR("?",4)="You may optionally enter or edit text to display in CPRS."
- +13 SET DIR("?",5)="Line 1 has a maximum of 24 characters."
- +14 SET DIR("??")="^D HELP^OROTHBTN"
- +15 DO ^DIR
- +16 IF $DATA(DUOUT)!($DATA(DTOUT))
- QUIT
- +17 SET LOCREAD1=$GET(X)
- +18 IF $GET(LOCREAD1)="^"
- QUIT
- +19 IF $GET(LOCREAD1)="@"
- SET LOCREAD1=""
- SET LOCNO=$$REMOVE(1,.LOCMSG)
- +20 IF $GET(LOCNO)=0
- IF $GET(X)="@"
- SET LOCREAD1=$GET(LOCMSG1)
- LOCLINE2 ;
- +1 NEW DIR,LOCNO2,DTOUT,DUOUT
- +2 SET (LOCNO,LOCNO2)=0
- SET DTIME=$SELECT($GET(DTIME)>300:300,1:$GET(DTIME))
- +3 WRITE !!
- +4 SET DIR(0)="FAO^0:70"
- SET DIR("A")=" Enter Line 2 (optional, 70 char max): "
- +5 SET DIR("B")=$GET(LOCMSG2)
- +6 SET DIR("T")=60
- +7 SET DIR("?")="Enter up to 70 characters. "
- +8 SET DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
- +9 SET DIR("?",2)="regardless of whether the user enters any further lines of data."
- +10 SET DIR("?",3)="It cannot be edited or deleted."
- +11 SET DIR("?",4)="You may optionally enter or edit text to display in CPRS."
- +12 SET DIR("?",5)="Line 2 has a maximum of 70 characters."
- +13 SET DIR("??")="^D HELP^OROTHBTN"
- +14 DO ^DIR
- +15 IF $DATA(DUOUT)!($DATA(DTOUT))
- QUIT
- +16 SET LOCREAD2=$GET(X)
- +17 IF $GET(LOCREAD2)="^"
- QUIT
- +18 IF $GET(LOCREAD2)="@"
- SET LOCREAD2=""
- SET LOCNO2=$$REMOVE(2,.LOCMSG)
- +19 IF $GET(LOCNO2)=0
- IF $GET(X)="@"
- SET LOCREAD2=$GET(LOCMSG2)
- +20 WRITE !
- +21 SET LOCMSG(1)=$GET(LOCREAD1)
- +22 SET LOCMSG(2)=$GET(LOCREAD2)
- +23 DO WP^DIE(8989.51,LOCIEN_",",20,"","LOCMSG","DGMTERR")
- +24 QUIT
- +25 ;
- HELP ; Long help text for ??
- +1 WRITE !,""
- +2 WRITE !,"The text 'Call Registration Team for Details.' will be displayed"
- +3 WRITE !,"regardless of whether the user enters any further lines of data."
- +4 WRITE !,"It cannot be edited or deleted."
- +5 WRITE !
- +6 WRITE !,"You may optionally add up to 2 additional lines of text"
- +7 WRITE !,"to be displayed in the OTH button in CPRS when it is"
- +8 WRITE !,"populated for a patient."
- +9 WRITE !
- +10 WRITE !,"Line 1 has a maximum of 24 characters."
- +11 WRITE !,"If a value is given for Line 1, it will be concatenated to the end"
- +12 WRITE !,"of 'Call Registration Team for Details.'"
- +13 WRITE !!,"Line 2 has a maximum of 70 characters."
- +14 WRITE !!,"All messages will display like this:"
- +15 WRITE !,"Call Registration Team for Details. Optional Line 1"
- +16 WRITE !,"Optional Line 2"
- +17 QUIT
- +18 ;
- REMOVE(LINE,LOCMSG) ;-- sure you want to delete?
- +1 NEW X,Y,DIR,DA
- +2 SET DIR(0)="YA"
- SET DIR("A")=" Are you sure you want to delete this line? "
- +3 SET DIR("B")="NO"
- WRITE $CHAR(7)
- +4 DO ^DIR
- +5 SET X=$$UP^XLFSTR(X)
- +6 IF $GET(X)="N"!($GET(X)="NO")
- SET LOCNO=0
- +7 IF $GET(X)="Y"!($GET(X)="YES")
- SET LOCNO=1
- +8 QUIT LOCNO
- +9 ;