ORXTABS2 ; SLC/PKS - Edit calls, tab parameters preferences. [10/2/00 3:53pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**9,47,84**;Dec 17, 1997
;
; Individual preferences edit/input code; called from ORXTABS1.
;
; NOTES: Most ORX* variables used herein are NEW'd in calling
; routines. Tags herein (except "INPUT") must match the
; name of a piece entry in the TABS tag of the ORXTABS
; routine and return:
;
; 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.
;
; If there are dissimilar types of values - to be obtained from
; the user - which utilize the same tag name, such differences
; must be handled within the individual tags herein by, for
; instance, examining the ORXPDIR variable which will reveal
; the current TABS line being processed.
;
; New variable used herein:
;
; ORXPASS = Holds ORXNOW original passed value.
;
; Important variables used or assigned by calling routines:
;
; ORXPDIR = Current tab's "prompt" or display string.
; ORXPDIS = Current value's "prompt" or display string.
; ORXNOW = Current value of setting, passed in each call.
;
; Actual code for these tags generally resides in a subsequent
; ORXTABSx routine, to keep this routine as a driver and with
; size limits. The tags in the subsequent routines use the
; same names for convenience.
;
Q
;
INPUT ; Call DIR, return user input - used by various tags called herein.
;
W !! ; Spacing for screen display.
;
; Assign default promtp, if any:
S:($D(ORXNOW)&(ORXNOW'="")) DIR("B")=ORXNOW
D ^DIR ; FM call for user input.
S ORXNOW=Y ; Assign input to ORXNOW.
K DIR,X,Y ; Clean up each time.
;
Q
;
BEG(ORXNOW) ; Beginning date of date range.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D BEG^ORXTABS3 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
END(ORXNOW) ; Ending date of date range.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D END^ORXTABS3 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
MAX(ORXNOW) ; Maximum number of items to display.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D MAX^ORXTABS3 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
AUTHOR(ORXNOW) ; Select note author.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D AUTHOR^ORXTABS3 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
STATUS(ORXNOW) ; Status.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D STATUS^ORXTABS4(ORXPDIR) ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
TYPE(ORXNOW) ; Type.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D TYPE^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
DISPGRP(ORXNOW) ; Display Group..
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D DISPGRP^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
OUTPT(ORXNOW) ; Outpatient or Inpatient Meds.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D OUTPT^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
SUBJECT(ORXNOW) ; Subject.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D SUBJECT^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
FORMAT(ORXNOW) ; Format.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D FORMAT^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D COMMENTS^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
SERVICE(ORXNOW) ; Service.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D SERVICE^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
OCCLIM(ORXNOW) ; Occlim.
;
N ORXPASS
S ORXPASS=ORXNOW
;
; Use loop to account for invalid entries:
F D Q:ORXNOW'="*Invalid*"
.S ORXNOW=ORXPASS ; Reset each time.
.D OCCLIM^ORXTABS5 ; Call input dialogue.
;
Q ORXNOW ; Return resulting value.
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORXTABS2 6776 printed Nov 22, 2024@17:48:06 Page 2
ORXTABS2 ; SLC/PKS - Edit calls, tab parameters preferences. [10/2/00 3:53pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**9,47,84**;Dec 17, 1997
+2 ;
+3 ; Individual preferences edit/input code; called from ORXTABS1.
+4 ;
+5 ; NOTES: Most ORX* variables used herein are NEW'd in calling
+6 ; routines. Tags herein (except "INPUT") must match the
+7 ; name of a piece entry in the TABS tag of the ORXTABS
+8 ; routine and return:
+9 ;
+10 ; 1 - A new value entered or selected by the user,
+11 ; 2 - A null string,
+12 ; 3 - The string "*Invalid*" - to repeat due to invalid entry,
+13 ; 4 - The "^" character, indicating user's cancel action.
+14 ;
+15 ; If there are dissimilar types of values - to be obtained from
+16 ; the user - which utilize the same tag name, such differences
+17 ; must be handled within the individual tags herein by, for
+18 ; instance, examining the ORXPDIR variable which will reveal
+19 ; the current TABS line being processed.
+20 ;
+21 ; New variable used herein:
+22 ;
+23 ; ORXPASS = Holds ORXNOW original passed value.
+24 ;
+25 ; Important variables used or assigned by calling routines:
+26 ;
+27 ; ORXPDIR = Current tab's "prompt" or display string.
+28 ; ORXPDIS = Current value's "prompt" or display string.
+29 ; ORXNOW = Current value of setting, passed in each call.
+30 ;
+31 ; Actual code for these tags generally resides in a subsequent
+32 ; ORXTABSx routine, to keep this routine as a driver and with
+33 ; size limits. The tags in the subsequent routines use the
+34 ; same names for convenience.
+35 ;
+36 QUIT
+37 ;
INPUT ; Call DIR, return user input - used by various tags called herein.
+1 ;
+2 ; Spacing for screen display.
WRITE !!
+3 ;
+4 ; Assign default promtp, if any:
+5 if ($DATA(ORXNOW)&(ORXNOW'=""))
SET DIR("B")=ORXNOW
+6 ; FM call for user input.
DO ^DIR
+7 ; Assign input to ORXNOW.
SET ORXNOW=Y
+8 ; Clean up each time.
KILL DIR,X,Y
+9 ;
+10 QUIT
+11 ;
BEG(ORXNOW) ; Beginning date of date range.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO BEG^ORXTABS3
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
END(ORXNOW) ; Ending date of date range.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO END^ORXTABS3
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
MAX(ORXNOW) ; Maximum number of items to display.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO MAX^ORXTABS3
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
AUTHOR(ORXNOW) ; Select note author.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO AUTHOR^ORXTABS3
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
STATUS(ORXNOW) ; Status.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO STATUS^ORXTABS4(ORXPDIR)
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
TYPE(ORXNOW) ; Type.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO TYPE^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
DISPGRP(ORXNOW) ; Display Group..
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO DISPGRP^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
OUTPT(ORXNOW) ; Outpatient or Inpatient Meds.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO OUTPT^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
SUBJECT(ORXNOW) ; Subject.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO SUBJECT^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
FORMAT(ORXNOW) ; Format.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO FORMAT^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO COMMENTS^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
SERVICE(ORXNOW) ; Service.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO SERVICE^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;
OCCLIM(ORXNOW) ; Occlim.
+1 ;
+2 NEW ORXPASS
+3 SET ORXPASS=ORXNOW
+4 ;
+5 ; Use loop to account for invalid entries:
+6 FOR
Begin DoDot:1
+7 ; Reset each time.
SET ORXNOW=ORXPASS
+8 ; Call input dialogue.
DO OCCLIM^ORXTABS5
End DoDot:1
if ORXNOW'="*Invalid*"
QUIT
+9 ;
+10 ; Return resulting value.
QUIT ORXNOW
+11 ;