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

OROTHBTN.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ; ICR# TYPE DESCRIPTION
  1. ; ---------------------------------
  1. ; 2685 PRI OE/RR Direct Access to File ^XTV(8989.51
  1. ;
  1. Q
  1. LOCMSG ; Add/Edit Local Message on OTH Button
  1. N LOCMSG1,LOCMSG2,DIE,DA,DR,ARRAY,ARRAY2,DIC,X,LOCIEN,LOCDFLT
  1. S LOCDFLT="Call Registration Team for Details. "
  1. S DIC="^XTV(8989.51,",DIC(0)="QEZ",X="OR OTH BTN LOCAL MSG"
  1. D ^DIC
  1. S LOCIEN=$P($G(Y),"^")
  1. D GETS^DIQ(8989.51,LOCIEN_",","**","","ARRAY")
  1. W #!,"Add/Edit Text for Display in OTH Button in CPRS",!
  1. W "-----------------------------------------------",!
  1. W "The text 'Call Registration Team for Details.' will always be displayed."
  1. W !,"It cannot be edited or deleted.",!
  1. W !,"All messages will display like this:"
  1. W !,"Call Registration Team for Details. Optional Line 1"
  1. W !,"Optional Line 2"
  1. W !!,"Current Local Message: ",!
  1. S LOCMSG1=$G(ARRAY(8989.51,LOCIEN_",","20",1))
  1. S LOCMSG2=$G(ARRAY(8989.51,LOCIEN_",","20",2))
  1. W $G(LOCDFLT)_$G(LOCMSG1),!
  1. W $G(LOCMSG2),!
  1. LOCLINE ; Return here if input is too long
  1. N LOCREAD1,LOCREAD2,LOCKEEP,LOCMSG,DIR,DTOUT,DUOUT
  1. N LOCNO
  1. S LOCNO=0,DTIME=$S($G(DTIME)>300:300,1:$G(DTIME))
  1. W !!
  1. S DIR(0)="FAO^0:24",DIR("A")=" Enter Line 1 (optional, 24 char max): "
  1. S DIR("B")=$G(LOCMSG1)
  1. S DIR("T")=60
  1. S DIR("?")="Enter up to 24 characters. "
  1. S DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
  1. S DIR("?",2)="regardless of whether the user enters any further lines of data."
  1. S DIR("?",3)="It cannot be edited or deleted."
  1. S DIR("?",4)="You may optionally enter or edit text to display in CPRS."
  1. S DIR("?",5)="Line 1 has a maximum of 24 characters."
  1. S DIR("??")="^D HELP^OROTHBTN"
  1. D ^DIR
  1. I $D(DUOUT)!($D(DTOUT)) Q
  1. S LOCREAD1=$G(X)
  1. I $G(LOCREAD1)="^" Q
  1. I $G(LOCREAD1)="@" S LOCREAD1="",LOCNO=$$REMOVE(1,.LOCMSG)
  1. I $G(LOCNO)=0,$G(X)="@" S LOCREAD1=$G(LOCMSG1)
  1. LOCLINE2 ;
  1. N DIR,LOCNO2,DTOUT,DUOUT
  1. S (LOCNO,LOCNO2)=0,DTIME=$S($G(DTIME)>300:300,1:$G(DTIME))
  1. W !!
  1. S DIR(0)="FAO^0:70",DIR("A")=" Enter Line 2 (optional, 70 char max): "
  1. S DIR("B")=$G(LOCMSG2)
  1. S DIR("T")=60
  1. S DIR("?")="Enter up to 70 characters. "
  1. S DIR("?",1)="The text 'Call Registration Team for Details.' will be displayed"
  1. S DIR("?",2)="regardless of whether the user enters any further lines of data."
  1. S DIR("?",3)="It cannot be edited or deleted."
  1. S DIR("?",4)="You may optionally enter or edit text to display in CPRS."
  1. S DIR("?",5)="Line 2 has a maximum of 70 characters."
  1. S DIR("??")="^D HELP^OROTHBTN"
  1. D ^DIR
  1. I $D(DUOUT)!($D(DTOUT)) Q
  1. S LOCREAD2=$G(X)
  1. I $G(LOCREAD2)="^" Q
  1. I $G(LOCREAD2)="@" S LOCREAD2="",LOCNO2=$$REMOVE(2,.LOCMSG)
  1. I $G(LOCNO2)=0,$G(X)="@" S LOCREAD2=$G(LOCMSG2)
  1. W !
  1. S LOCMSG(1)=$G(LOCREAD1)
  1. S LOCMSG(2)=$G(LOCREAD2)
  1. D WP^DIE(8989.51,LOCIEN_",",20,"","LOCMSG","DGMTERR")
  1. Q
  1. ;
  1. HELP ; Long help text for ??
  1. W !,""
  1. W !,"The text 'Call Registration Team for Details.' will be displayed"
  1. W !,"regardless of whether the user enters any further lines of data."
  1. W !,"It cannot be edited or deleted."
  1. W !
  1. W !,"You may optionally add up to 2 additional lines of text"
  1. W !,"to be displayed in the OTH button in CPRS when it is"
  1. W !,"populated for a patient."
  1. W !
  1. W !,"Line 1 has a maximum of 24 characters."
  1. W !,"If a value is given for Line 1, it will be concatenated to the end"
  1. W !,"of 'Call Registration Team for Details.'"
  1. W !!,"Line 2 has a maximum of 70 characters."
  1. W !!,"All messages will display like this:"
  1. W !,"Call Registration Team for Details. Optional Line 1"
  1. W !,"Optional Line 2"
  1. Q
  1. ;
  1. REMOVE(LINE,LOCMSG) ;-- sure you want to delete?
  1. N X,Y,DIR,DA
  1. S DIR(0)="YA",DIR("A")=" Are you sure you want to delete this line? "
  1. S DIR("B")="NO" W $C(7)
  1. D ^DIR
  1. S X=$$UP^XLFSTR(X)
  1. I $G(X)="N"!($G(X)="NO") S LOCNO=0
  1. I $G(X)="Y"!($G(X)="YES") S LOCNO=1
  1. Q LOCNO
  1. ;