MEDITECH DR, NPR, MEDITECH Reporting, MEDITECH Reports, MEDITECH DR Reports, MEDITECH BI, MEDITECH Data Repository
I'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...
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
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
Current Articles | RSS Feed
=== QUESTION ===I have a MEDITECH report that calls a Pharmacy fragment report in a LC on HK7. Sometimes the Fragment returns a value and sometimes not. On my main report I want to count how many times a value is returned and how many times not. Here is the LC from the main report:LC=@acct.number.display%5E/R.FRAG.ARG.1,LC=%Z.rw.fragment("PHA.RX.zcus.sh.R","PHA.JOB"),1Any suggestions ???Terry === ANSWER ===As you know, NPR fragments do not clean up the /R.FRAG.VAL.xx variables after fragments run. Which is why the /R.FRAG.VAL.xx structures are used to return your data. Here is one strategy that might work for you: Set this value: 0^/R.FRAG.VAL.RESULT at the beginning of the fragment: at the top of your macro or another suitable place like a line attribute, footnote or custom field. If the fragment has data to return, set this value: 1^/R.FRAG.VAL.RESULT near the end of the fragment: near the bottom of the macro that gets your data or another suitable place like a line attribute, footnote or custom field. Extend your HK7 line check to calculate the total: LC=@acct.number.display%5E/R.FRAG.ARG.1,LC=%Z.rw.fragment("PHA.RX.zcus.sh.R","PHA.JOB"),LC=/R.FRAG.VAL.RESULT+/HK7.TOTAL^/HK7.TOTAL,1Depending on your report's setup; you could define an xx.total field and set VAL=/HL7.TOTAL.John
Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!
Allowed tags: <a> link, <b> bold, <i> italics