First, if there is a 'function' or something that already exists, I'm
not aware of one. If there is, what is it?? Assuming there isn't.. I've
written the following macro, but it ins't working! Argh!
Here is my macro (simplified version)...
==========
; initializing my variables
0^/ZZZ, (that is a zero!)
""^/BPMH^/BPML^/BPMT,
;BPMT IS MY temp value, bpmh is my HI, bpml is my LOW
@GET.DATA,
; some more stuff
GET.DATA
;loop through and look get values
DO Loop{
@somefield.value^/BPMT,
@SORT.DATA,
NEXT Loop}
SORT.DATA
IF{/ZZZ=0 /BPMT^/BPMH^/BPML;IF{/BPMT'</BPMH /BPMT^/BPMH;/BPMT^/BPML}},
/ZZZ+1^/ZZZ
; essentially how this works is the first time through (zzz=0) set the
high and low equal to the temp value
; then the next times.. If the temp is GTE high then set high = temp,
otherwise set low=temp.
=========
On my picture, I am getting the correct HIGH value to show up.. That
works!
But.. My LOW is always BLANK or empty.. Never populated..
What am I doing wrong!?
TIA!
Jim Joyner - Quality Svcs.
St. Patrick Hospital
406-327-1918
====================================
Keep up to date on recent announcements about MUSE by visiting the meditech-l web site at MTUsers.net and go to the tab labeled "MUSE - Dallas 05/08"
If you want to ask a question from the meditech-l users who will be attending MUSE or share something about MUSE with each other, you can post messages on the web site on the tab "MUSE - Dallas 05/08"
Using the ! operator as maximum and the & operator as minimum.
Pseudo code:
;
; Start Loop
;
INITIALVALUE^MIN^MAX,
;
DO{1 NEWVALUE!MAX^MAX,
NEWVALUE&MIN^MIN},
;
; End Loop
;
N("Maximum=",MAX)^#,
N("Miniumum=",MIN)^#,
;
;
END
James Purvins
Inland Northwest Health Services
(509) 232-8384
This e-mail and any attachments are confidential and may also be
privileged. If you are not the named recipient, or have otherwise
received this communication in error, please delete it from your inbox,
notify the sender immediately by replying to the message, and do not
disclose its contents to any other person, use the information for any
purpose or store or copy the information in any medium. Thank you for
your cooperation
Try This
""^HIGH^LOW^NDX,
DO{+VALUE[NDX]^NDX IF{'LOW VALUE[NDX]^LOW;
LOW>VALUE[NDX] VALUE[NDX]^LOW},
IF{'HIGH VALUE[NDX]^HIGH;
HIGH<VALUE[NDX] VALUE[NDX]^HIGH}}
Replace VALUE with your structure
This should work
Hope this Helps
Ken
-----Original Message-----
From: meditech-...@mtusers.com [mailto:meditech-...@mtusers.com] On Behalf Of Joyner, Jim
Sent: Friday, September 05, 2008 1:25 PM
To: medit...@MTusers.com
Subject: [MEDITECH-L] CS 5.54, Getting Min/Max Values in a Macro... Possible?