MEDITECH Reports, MEDITECH NPR Reports, NPR Report Writing, NPR Report Writer, NPR Report, MEDITECH Reporting, MEDITECH Report MEDITECH Reports, NPR Reports, NPR Report Writing, NPR Report Writer, MEDITECH NPR

Tuesday, October 16, 2007

Stacking / Unstacking Prefixes

$T Example - Stacking the Slash File:

ZCUS.SLASH,
; Instantiate/Open slash file.
O(/,"P"),
1^/SLASH,
; Instantiate new / file, while stacking the current one.
O(/S,"P"),
2^/SLASH,
; Close the current / file, while unstacking the previous / file.
C(/U),
; Check to see if / is open; X is equal to "P".
O(/)^X,
; Check the value of /SLASH, it will be 1
NN(/SLASH)^#,
N("")^#;

MEDITECH does not stack the /.. variables in the slash file with their Z.stack.slash which is used in their CDSs.

NPR Report Writer Solution from Michael Laban at ECHN:

1^/X,
%Z.stack.slash("N"),
2^/X,
%Z.stack.slash("U"),
%Z.ddc(" slash"),
END;

Elegant solution from Joe Cocuzzo at Iatric Systems:

You can also do C(/X) to exchange the current slash for the stacked slash file, then do C(/X) again to put things “back”. This is handy for the Non MEDITECH data source option in PCI when you need to know more than just a unit number (like the user mnemonic, account number selected etc).

2 Comments:

At 10:30 AM , Anonymous Anonymous said...

With the syntactic restrictions in MT 5.6, what shortcuts do you recommend for performing the following operations:

*Killing a structure K(:ECT)

*Seg'ing to a new segment/directory
$SEG(SEG,DIR)

*Opening slash to private
O(/,"P")

I think you answered this one previously.

Thanks

 
At 10:50 AM , Blogger olesharpie said...

Response: http://streamlineit.biz/blogs/npr/2007/10/syntax-workarounds.html

 

Post a Comment

Links to this post:

Create a Link

<< Home