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

ORXTABS5.m

Go to the documentation of this file.
  1. ORXTABS5 ;SLC/PKS - Edit calls, tab parameters preferences. [11/22/00 11:16am]
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**9,47,84**;Dec 17, 1997
  1. ;
  1. ; NOTES: The routines herein are called by those of the same tag
  1. ; name in ORXTABS2. Most variables are NEW'd and assigned
  1. ; by one or more routines in the preceding call chains.
  1. ; Refer to comments and notes there for additional infor-
  1. ; mation.
  1. ;
  1. ; Each tag in this routine must return one of the following:
  1. ;
  1. ; 1 - A new value entered or selected by the user,
  1. ; 2 - A null string,
  1. ; 3 - The string "*Invalid*" - to repeat due to invalid entry,
  1. ; 4 - The "^" character, indicating user's cancel action.
  1. ;
  1. ; Some tags in this routine are functions or calls used by
  1. ; other tags herein.
  1. ;
  1. Q
  1. ;
  1. TYPE ; Type, for labs.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_": "
  1. S DIR("A",1)=" L List Format"
  1. S DIR("A",2)=" C Cumulative Format"
  1. S DIR(0)="SAO^L:List Format;C:Cumulative Format" ; Optional, Set of Codes.
  1. ;
  1. ; Translate one value to match past practice:
  1. I ORXNOW="R" S ORXNOW="L"
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. ; Re-translate one value to match past practice:
  1. I ORXNOW="L" S ORXNOW="R"
  1. ;
  1. ; Present applicability message to user:
  1. W !!,"(NOTE: This setting applies only to the LM version of CPRS.)",!
  1. ;
  1. Q
  1. ;
  1. DISPGRP ; Display Group (service/section), for orders.
  1. ;
  1. ; Internal variables used:
  1. ;
  1. ; DIC,X,Y,DTOUT,DUOUT = Variables for FM calls.
  1. ; ORXDONE = Flag for loop exit.
  1. ; ORXTMP = Temporary variable for value holding.
  1. ;
  1. N DIR,X,Y,DTOUT,DUOUT,ORXDONE,ORXTMP
  1. ;
  1. ; Set/translate current setting into a display value:
  1. I (('$D(ORXNOW))!(ORXNOW="")) S ORXNOW="ALL"
  1. S ORXTMP=0
  1. I ORXNOW'="" D
  1. .S ORXTMP=$O(^ORD(100.98,"B",ORXNOW,ORXTMP))
  1. .I ORXTMP>0 S ORXTMP=$P(^ORD(100.98,ORXTMP,0),U)
  1. ;
  1. ; Establish loop for input control:
  1. S ORXDONE=0
  1. F D Q:ORXDONE
  1. .W !!," Enter "_ORXPDIS_" for display of orders."
  1. .W !!," Select Service/Section: "_ORXTMP_"//"
  1. .R X:DTIME S:'$T X="^" I X["^" S ORXDONE=1 Q
  1. .I X="" S ORXDONE=1 Q ; No change.
  1. .I X="@" S ORXDONE=1 Q ; Results in default.
  1. .I X["?" W !!," Choose from:",! D DG^ORCHANG1(1,"DISP") Q
  1. .S DIC=100.98,DIC(0)="NEQZ"
  1. .D ^DIC
  1. .S:Y>0 ORXNOW=$P(Y(0),U,3),ORXDONE=1
  1. I X="@" S ORXNOW=X
  1. I (ORXNOW="@") S ORXNOW="ALL" ; Bottom line default.
  1. ;
  1. Q
  1. ;
  1. OUTPT ; Outpatient (0) or Inpatient (1) meds display.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_": "
  1. S DIR("A",1)=" 0 Outpatient"
  1. S DIR("A",2)=" 1 Inpatient"
  1. S DIR(0)="SAO^0:Outpatient;1:Inpatient" ; Optional, Set of Codes.
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. Q
  1. ;
  1. SUBJECT ; Subject, for notes.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_" setting: "
  1. S DIR("A",1)=" 0 Off/Hide Subjects"
  1. S DIR("A",2)=" 1 On/Show Subjects"
  1. S DIR(0)="SAO^0:Off/Hide Subjects;1:On/Show Subjects"
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. Q
  1. ;
  1. FORMAT ; Format, for orders.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_" setting for Orders: "
  1. S DIR("A",1)=" L Long"
  1. S DIR("A",2)=" S Short"
  1. S DIR(0)="SAO^L:Long;S:Short"
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. Q
  1. ;
  1. COMMENTS ; Comments, for problems.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_" setting for Problems: "
  1. S DIR("A",1)=" 0 Off/Hide Comments"
  1. S DIR("A",2)=" 1 On/Show Comments"
  1. S DIR(0)="SAO^0:Off/Hide Comments;1:On/Show Comments"
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. Q
  1. ;
  1. SERVICE ; Service, for consults.
  1. ;
  1. ; Internal variables used:
  1. ;
  1. ; DIC,X,Y,DTOUT,DUOUT = Variables for call to DIC.
  1. ;
  1. N DIC,X,Y,DTOUT,DUOUT
  1. ;
  1. ; Assign DIC variables and call DIC:
  1. S DIC=123.5
  1. S DIC(0)="AEFMQ"
  1. S DIC("A")=" Select service for Consults: "
  1. S DIC("B")="ALL"
  1. S:$L($G(ORXNOW)) DIC("B")=ORXNOW
  1. S DTIME=120
  1. W !! ; Screen formatting.
  1. D ^DIC
  1. ;
  1. I $D(DUOUT) S ORXNOW="^"
  1. I $D(DTOUT) S ORXNOW="^"
  1. ;
  1. ; Examine user entry, treat if needed, and assign it for return:
  1. I ORXNOW'="^" S:+Y'>0 Y=""
  1. I ORXNOW'="^" S ORXNOW=+Y
  1. ;
  1. K DIC,X,Y,DTOUT,DUOUT ; Clean up before exit.
  1. ;
  1. Q
  1. ;
  1. OCCLIM ; Occurrence Limit, for notes.
  1. ;
  1. ; Assign DIR variables:
  1. S DIR("T")=120 ; Two minute maximum timeout for response.
  1. S DIR("A")=" Enter "_ORXPDIS_" setting for Notes: "
  1. S DIR("?")=" Entry must be between 1 and 9,999,999"
  1. S DIR(0)="NA^1:9999999" ; Numerical, required.
  1. ;
  1. ; Call tag to get/assign input:
  1. D INPUT^ORXTABS2
  1. ;
  1. I ORXNOW'="^" D
  1. .W !!,"(NOTE: Setting may be overridden by your TIU Personal Preferences.)",!
  1. .H 2
  1. ;
  1. Q
  1. ;