If you need to write an NPR report and find all records with no value (nil) in a field, you can often write a simple selection EQ nil. For example if you want to find all entries in your discharge disposition dictionary that do not have a "billing code" (@ub82.code) field value,
The reason this report works fine is that the @ub82.code field is a data field in the main segment, so the report can loop thru the main segment and test the field for a nil value and list all records for which the field is empty. (The report writer actually tests the length of the field and selects records where the length of the field is zero, it does not do @field="".)
Sometimes if a field is nil, there won't be a record in the data segment. Let's say you needed to write an NPR report to look thru the MIS discharge disposition dictionary for all entries that lack an Abstracting Tape Code for the "RATE" tape code. The problem is that until you create a tape code, no data will exist in the segment where the tape codes are stored.
It might be clearer how this works if you look at a screen shot of a dictionary entry:
The report below is doomed to get no records no matter how many unmapped discharge disposition codes you have in the dictionary. Any discharge disposition lacking a tape code for the "RATE" service will be invisible to the report, so even though the @abs.tape.code field is nil for a particular disposition code, for the "RATE" service, the report will not list that disposition.
The solution is to write a computed selection field that looks into the child segment to see if tape code exists for a particular tape service:
Add a computed selection field to your report:
In the computed select field, put the value "RATE" in the subscript of the child segment, then test to see if a code exists for that service. If NOT, then this is a record you want to select.
With this report, we are able to list all the discharge disposition codes that lack an abstracting tape code for the "RATE" tape service.
Since this month's tip is generic, the example report was just built for illustration purposes and was not uploaded to the library. Visit our library to search for other tips: http://www.iatric.com/information/NPRReportLibrarySearch.aspx.
Upcoming NPR Training Opportunities:
We are pleased to offer NPR Report Writer training sessions at host sites. Details and a course description are available on our website at http://www.iatric.com/Information/Classes.aspx.
|Greater Baltimore Medical CenterBaltimore, MD||Beginner / Intermediate||Jim Fahnestock||September 13-15, 2011||$750|
|Greater Baltimore Medical CenterBaltimore, MD||Intermediate / Advanced||Philip Sherry||October 10-12, 2011||$750|
To subscribe for email notifications for new classes, please visit: http://www.iatric.com/Information/Classes.aspx
For more information or to reserve a seat, please contact Karen Roemer at 978-805-3142 or email email@example.com.
(This article originally appeared in the July 2011 issue of Iatric Systems’ Updates! newsletter.)