About MEDITECH Reports

 

View John Sharpe's profile on LinkedInI'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...

Connect ...

Expand your network by connecting on these social media sites:

Sign up for the MEDITECH Reports Blog; details to attend MEDITECH workshops are sent out 1 week in advance to all MEDITECH Report blog subscribers.

These MEDITECH Workshops are sponsored by Donna Carroll at the MEDITECH Community Bulletin

MEDITECH NPR & RW RESOURCES:

Ascii Table: For NPR Report Writer
Loop Builder: For NPR Macros
Key Codes: For CDS Attributes
List Builder: For NPR Macros
MT Report Names: For NPR Reports
MT Structure Viewer: For Physicals
Strings: Format & Sort

HIT Topics

MEDITECH Reports

Current Articles | RSS Feed RSS Feed

Reverse DO Loop Walk Thru (MEDITECH NPR)

 

GET.DETAIL
; EDM.PAT.daily.log.x[ADM.PAT.facility,registration.date,registration.time,urn]
; ?(HE)HEAADL[gqb,heRDT,heRTM,aa]
""^ADM.PAT.facility^registration.date^registration.time^urn,
DO{@Next(urn,daily.log.x) @RECORD;
@Next(registration.time,daily.log.x) ""^urn;
@Next(registration.date,daily.log.x) ""^registration.time;
@Next(ADM.PAT.facility,daily.log.x) b.registration.date^registration.date}

Reverse DO Loop Walk Thru:

Line 1
Code: DO{@Next(urn,daily.log.x) @RECORD;
Explained: Try to get the next urn from the EDM.PAT.daily.log.x index. This is the first time thru, the facility, registration.date & registration.time subscripts won’t be set up. So, nothing happens and we proceed thru down to Line 2.

Line 2:
Code: @Next(registration.time,daily.log.x) ""^urn;
Explained: Try to get the next registration time. This is the first time thru, the other subscripts are NIL, so proceed to Line 3.

Line 3:
Code: @Next(registration.date,daily.log.x) ""^registration.time;
Explained: Try to get the next registration date. This is the first time thru, the other subscripts are NIL, so proceed to Line 4.

Line 4:
Code: @Next(ADM.PAT.facility,daily.log.x) b.registration.date^registration.date}
Explained: Get the next facility in the index. Set the starting registration.date. Go to Line 1.

Line 1:
Explained: Try to get the next urn. We have 2 (ADM.PAT.facility,registration.date) of the 3 subscripts required to next on urn. Fall down to Line 2.

Line 2:
Explained: Get the next registration.time. Set the urn subscript to NIL.

Line 1:
Get the next urn. Go RECORD some data.

At each level of @Next processing, processing starts over at the top and proceeds until there are no more records for the subscripts in play.

Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!

Subscribe to the Meditech Blog     

                                                                                                                                                                                                          

Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics