CPRS Graphing Issues

From VistApedia
Jump to: navigation, search

This page will report exploration of the Report process in CPRS.

Kevin T: When clicking on reports in the TreeView, each node contains information about the report. Each report Record has a .RptType property. If that property is 'H', then web browser is shown. When the TreeView is being populated the following happens:

fReports.LoadTreeview 
 --> rReports.ListReports 
   --> rReports.LoadTree 
     --> RPC call to ORWRP3 EXPAND COLUMNS 
   --> cycle through entries in report 
      --> Call uReports.MakeReportTreeObject with pieces 2..15 
               and specifically, RptType comes from piece 8 

Moving to the server... ORWRP3 EXPAND COLUMNS --> LIST^ORWRP3 And the comments for the RPC state:

 "This RPC loads and expands nested reports defined in the OE/RR Reports file (#101.24) for use on the Reports Tab in CPRS." 

So then I look at file 101.24, and I see field TYPE (.12), which is a SET, and H stands for HTML.

Clicking on the TreeView in the Reports Tab: Clinical Reports>Vital Signs causes a report to be generated in CPRS. The report is a set of columns:

 Measurement Date/Time |  TEMP | PULSE | RESP .... 

Below is the Record from 101.24 that defined the node.

==

Record~|Record]]# 1029, in FILE: 101.24

 .001-NUMBER : 1029 
  .01-NAME : ORRPW VITALS 
  .02-ID : OR_VS 
  .03-REMOTE : YES 
  .04-QUALIFIER : HSWPComponent 
  .05-ROUTINE : ORDV01 
  .06-ENTRY POINT : HSQUERY 
  .07-CATEGORY : LISTVIEW 
  .08-TAB : REPORTS TAB 
  .12-TYPE : LISTVIEW 
  .13-RPC : ORWRP REPORT TEXT 
  .19-REPORT TAG : VS 
 .191-REPORT ROUTINE : ORDV04 
 .192-REPORT COMPONENT : VITAL SIGNS 
  .23-HEADING : Vital Signs 
  .24-DESCRIPTIVE TEXT : Vital Signs 
  .28-EXTRACT TAG : EN1 
  .29-EXTRACT ROUTINE : GMRVUT0 
  .41-SORT ORDER : 3:0 
    3-COLUMN HEADERS : 
      Multiple Entry #1 
      .01-COLUMN HEADERS : Facility 
      .03-SEQUENCE : 1 
      .06-PRINT LENGTH : 10 
      .07-INCLUDE ON PRINT : YES 
      Multiple Entry #2 
      .01-COLUMN HEADERS : Measurement Date/Time 
      .03-SEQUENCE : 3 
      .06-PRINT LENGTH : 18 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : DATE/TIME 
      Multiple Entry #3 
      .01-COLUMN HEADERS : TEMP 
      .03-SEQUENCE : 4 
      .06-PRINT LENGTH : 5 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : NUMERIC 
      Multiple Entry #4 
      .01-COLUMN HEADERS : PULSE 
      .03-SEQUENCE : 5 
      .06-PRINT LENGTH : 5 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : NUMERIC 
      Multiple Entry #5 
      .01-COLUMN HEADERS : RESP 
      .03-SEQUENCE : 6 
      .06-PRINT LENGTH : 5 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : NUMERIC 
      Multiple Entry #6 
      .01-COLUMN HEADERS : Blood Pressure 
      .03-SEQUENCE : 7 
      .06-PRINT LENGTH : 12 
      .07-INCLUDE ON PRINT : YES 
      .08-PRINT TITLE : Pressure 
      Multiple Entry #7 
      .01-COLUMN HEADERS : Height 
      .03-SEQUENCE : 8 
      .06-PRINT LENGTH : 6 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : NUMERIC 
      Multiple Entry #8 
      .01-COLUMN HEADERS : Weight 
      .03-SEQUENCE : 9 
      .06-PRINT LENGTH : 6 
      .07-INCLUDE ON PRINT : YES 
      .09-DATA TYPE : NUMERIC 
      Multiple Entry #9 
      .01-COLUMN HEADERS : ID 
      .02-VISIBLE : NO 
      .03-SEQUENCE : 2 
      Multiple Entry #10 
      .01-COLUMN HEADERS : Pain 
      .03-SEQUENCE : 10 
      .06-PRINT LENGTH : 6 
      Multiple Entry #11 
      .01-COLUMN HEADERS : POx 
      .03-SEQUENCE : 11 
      .06-PRINT LENGTH : 6 
      Multiple Entry #12 
      .01-COLUMN HEADERS : CVP 
      .03-SEQUENCE : 12 
      .06-PRINT LENGTH : 6 
      Multiple Entry #13 
      .01-COLUMN HEADERS : C/G 
      .03-SEQUENCE : 13 
      .06-PRINT LENGTH : 6 
===========

Especially notice the RPC field which indicates how it should as the server for data:

  .13-RPC : ORWRP REPORT TEXT 

And the list of RPC broker data shows that this was indeed fired, and below is the results that were returned.

 ==================== 
 ORWRP REPORT TEXT 
 Called at: 9:30:52 PM 
 Params 
 ------------------------------------------------------------------ 
 literal 15953 
 literal OR_VS:VITAL SIGNS~VS;ORDV04;47;10 
 literal 
 literal 365 
 literal 
 literal 0 
 literal 0 
 Results 
 ----------------------------------------------------------------- 
 1^VOE OFFICE INSTITUTION OLD;050 
 2^07/27/2010 09:47 
 4^88 
 6^129/68 
 8^285 
 1^VOE OFFICE INSTITUTION OLD;050 
 2^07/06/2010 16:26 
 4^73 
 6^126/62 
 8^280 
 1^VOE OFFICE INSTITUTION OLD;050 
 2^04/05/2010 17:19 
 4^94 
 6^136/78 
 8^281 
 1^VOE OFFICE INSTITUTION OLD;050 
 2^01/08/2010 11:09 
 4^72 
 6^100/59 
 8^281 
 1^VOE OFFICE INSTITUTION OLD;050 
 2^11/13/2009 10:47 
 4^76 
 6^132/69 
 Elapsed Time: 219 ms 
 ==================== 

What I don't understand are these fields:

  .05-ROUTINE : ORDV01 
  .06-ENTRY POINT : HSQUERY 
  .19-REPORT TAG : VS 
 .191-REPORT ROUTINE : ORDV04 
  .28-EXTRACT TAG : EN1 
  .29-EXTRACT ROUTINE : GMRVUT0 

So the following bits of server code are executed. Below are comments from the data dictionary.

 HSQUERY^ORDV01 <-- "invoked to produce the report" 
 VS^ORDV04  <-- "entry point tag for a report extract" 
 EN1^GMRVUT0 <-- "entry point for the extract routine that pulls 
                   the data from package API's and/or package files." 

Also, I notice in the RPC call above:

   OR_VS:VITAL SIGNS~VS;ORDV04;47;10 
 which has VS^ORDV04 in it. 

So apparently the RPC call must be somewhat generic, and more specific output comes from VS^ORDV04 ...more later.....

Eddie H:

Thus far it looks like... DEFINING REPORTS


The root nodes for the Reports listview is defined in XPAR EDIT PARAMETER under ORWRP REPORT LIST.

The Precedence is System, User, Package, then Division.

From that point, if any Report is defined as a Menu in the Type field (.12) it will be a parent to any reports listed in the Item field (10).

For each report, field .05 (Routine) and .06 (Entry Point) are defined to execute mumps code which will create the report.

According to the CPRS Technical Manual: GUI Version Dated 7/16/2010 [1]

"Many of the reports use the same M code for display in the GUI and display to terminal based application~|Application]]s. Using a HOST file to act as a buffer to hold the report does this. The code uses the same M write commands and spacing as if writing to a printer or screen display. The data in the host file is then read into a global using %ZISH utilities provided by Kernel. The global can then be passed back to the GUI via the RPC Broker or used for conventional reporting (e.g. List Manager). This allows report changes to affect both the GUI and screen displays." (page. 186) To create an HTML report, the type would be defined as Type HTML in the .12 field. The server-side code (defined in the Routine and Entry Point fields) will be responsible for inserting the HTML tags.

GRAPHS


You can view graphs one of two ways... By pressing Ctrl + G in CPRS in the reports Tab, all defined graphs will be displayed or you can assign a graph to a report.

To create a graph report enter "Graph" in the Type field (.12), set the ID field to OR_GRAPHS, and assign 1 or 2 views to the graph in field Param 1 and Param 2 (.21 and .22 respectively).

To create a view, you go to Tools -> Options -> Graph Tab and click on View Definitions. Here you can create a view by choosing which fields to include. The view can be saved as either a Personal or Public view. If the Save Personal button is not active, this means that the user is not a member of an authorized group (see below). After naming it, then it can be added to the Param 1 or 2 and when that report is selected it will be inserted into the report.

Options for displaying graphs can be customizing by clicking on the Default Graph Settings under the Graph tab from above. To save a View as a Public view, you must be a member of a class who is authorized to save as such. To add classes, go to the XPAR EDIT PARAMETER option and enter the ORWG GRAPH PUBLIC EDITOR CLASS. Select a Sequence number and then enter the desired User Class (e.g. Clinical Coordinator). Now all users who are members of this class will have access.