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

Monday, August 25, 2008

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.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home