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