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

ORCXPND.m

Go to the documentation of this file.
  1. ORCXPND ; SLC/MKB - Expanded Display ;6/3/97 11:04
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
  1. RESULTS ; -- Results Display
  1. N ORESULTS S ORESULTS=1
  1. EN ; -- main entry point for OR DETAILED DISPLAY
  1. I '$G(ORNMBR) S ORNMBR=$$ORDERS^ORCHART("display") I 'ORNMBR S VALMBCK="" Q
  1. D EN^VALM("OR DETAILED DISPLAY") S VALMBCK="R"
  1. Q
  1. ;
  1. EN1(DFN,ID,ORTAB) ; -- entry point for independent display
  1. Q:'DFN Q:'$D(ID) S:'$D(ORTAB) ORTAB="ORDERS"
  1. N ORNMBR,ORVP,ORPNM,ORSSN,ORDOB,ORAGE,ORSEX,ORTS,ORWARD,ORATTEND,ORL,OREBUILD
  1. S ORNMBR=-1,^TMP("OR",$J,ORTAB,"IDX",ORNMBR)=ID D SLCT1^ORQPT
  1. D EN^VALM("OR DETAILED DISPLAY")
  1. Q
  1. ;
  1. INIT ; -- init variables and list array
  1. ; ORNMBR=#[,#,...,#] of selection[s]
  1. N LCNT,ORPIECE,NUM,ID S LCNT=0
  1. F ORPIECE=1:1:$L(ORNMBR,",") S NUM=$P(ORNMBR,",",ORPIECE) I NUM D:LCNT BORDER S ID=$P($G(^TMP("OR",$J,ORTAB,"IDX",NUM)),U) D @(ORTAB_"^ORCXPND1") ; create ^TMP("ORXPND",$J)
  1. S VALMCNT=LCNT,VALM("TITLE")=$$TITLE(ORTAB)
  1. M ^TMP("VALM VIDEO",$J,VALMEVL)=^TMP("ORXPND",$J,"VIDEO")
  1. Q
  1. ;
  1. BORDER ; -- Insert border between items
  1. S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=" "
  1. S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=$$REPEAT^XLFSTR("*",79)
  1. S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=" "
  1. Q
  1. ;
  1. MSG ; -- set msg line, XQORM("KEY")
  1. N ACTION S ACTION=$P($G(^TMP("ORXPND",$J,0)),U,2)
  1. I '$L(ACTION) S VALMSG="Enter ? for more help." Q
  1. I ACTION="NEW" S VALMSG="Enter NW to place another order.",XQORM("KEY","NW")=$O(^ORD(101,"B","ORCB NEW ORDER",0))_"^1"
  1. I ACTION="RENEW" S VALMSG="Enter RN to renew this order.",XQORM("KEY","RN")=$O(^ORD(101,"B","ORCB RENEW ORDER",0))_"^1"
  1. I ACTION="REPLACE" S VALMSG="Enter RP to replace this order.",XQORM("KEY","RP")=$O(^ORD(101,"B","ORCB REPLACE ORDER",0))_"^1"
  1. Q
  1. ;
  1. MARGIN ; -- Reset bottom margin if menu display off
  1. N BM S BM=$S(VALMMENU:17,1:21) Q:BM=VALM("BM") ; no change
  1. S VALM("BM")=BM,VALM("LINES")=VALM("BM")-VALM("TM")+1,VALMBCK="R"
  1. Q
  1. ;
  1. HELP ; -- help code
  1. N X S VALMBCK="" I 'VALMMENU D FULL^VALM1 S VALMBCK="R"
  1. W !!,"Use the actions listed to scroll up and down, to view the data; if you want",!,"to search the data for a particular string, enter SL. You may print the"
  1. W !,"data, either the entire list or just the current screen, by entering PL or PS",!,"respectively. Enter Q when finished to return to the chart."
  1. W !!,"Press <return> to continue ..." R X:DTIME
  1. Q
  1. ;
  1. EXIT ; -- exit code
  1. K ^TMP("ORXPND",$J)
  1. Q
  1. ;
  1. SETVIDEO(LINE,COL,WIDTH,ON,OFF) ; -- set video attributes
  1. S ^TMP("ORXPND",$J,"VIDEO",LINE,COL,WIDTH)=ON
  1. S ^TMP("ORXPND",$J,"VIDEO",LINE,COL+WIDTH,0)=OFF
  1. Q
  1. ;
  1. BLANK ; -- blank line
  1. S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=" "
  1. Q
  1. ;
  1. ITEM(X) ; -- set name of item into display
  1. S LCNT=LCNT+1,^TMP("ORXPND",$J,LCNT,0)=X
  1. I $D(IORVON),$D(IORVOFF) D SETVIDEO(LCNT,1,$L(X),IORVON,IORVOFF)
  1. Q
  1. ;
  1. TITLE(TAB) ; -- Screen title
  1. N Y S Y=""
  1. S:TAB="COVER" Y="Allergies/Alerts"
  1. S:TAB="NOTES" Y="Progress Note"
  1. S:TAB="PROBLEMS" Y="Problem"
  1. S:TAB="MEDS" Y="Medication"
  1. S:TAB="LABS" Y="Laboratory"
  1. S:TAB="ORDERS" Y=$S($G(ORESULTS):"Results",1:"Order")
  1. S:TAB="REPORTS" Y="Report"
  1. S:TAB="CONSULTS" Y="Consult/Procedure"
  1. S:TAB="XRAYS" Y="Radiology"
  1. S:TAB="SUMMRIES" Y="Discharge Summary"
  1. S:TAB="PTINQ" Y="Patient Inquiry"
  1. S:(TAB="NEW")!(TAB="DELAY") Y="Order"
  1. Q Y_" Display"