28
CCL Reports Tips on creating the best reports for both the clinician and the Cerner system Sue Nuyda Clarian Health, Indianapolis May 2, 2007

CCL Reports

Embed Size (px)

DESCRIPTION

CCL Reports. Tips on creating the best reports for both the clinician and the Cerner system Sue Nuyda Clarian Health, Indianapolis May 2, 2007. Objectives. Keep the end-user in mind Keep the report-writer in mind map front-end fields to back-end tables use comments, documentation - PowerPoint PPT Presentation

Citation preview

Page 1: CCL Reports

CCL Reports

Tips on creating the best reports for both the clinician and the Cerner system

Sue Nuyda

Clarian Health, Indianapolis

May 2, 2007

Page 2: CCL Reports
Page 3: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 4: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 5: CCL Reports

Bad Example:

What’s wrong with this picture?

Page 6: CCL Reports

Bad Example:

• report name is ambiguous• description and purpose are missing• no guidance for parameters

Page 7: CCL Reports

Good Example:• complete report description which includes original requestor’s name• dropdowns that eliminate guesswork

Page 8: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 9: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 10: CCL Reports

SELECT DISTINCT DC.COLUMN_NAME,

DC.TABLE_NAME,DC.CODE_SET,INDEXED = IF (D.COLUMN_POSITION = 1) "Y" ELSE "N" ENDIF,DC.ROOT_ENTITY_ATTR,DC.ROOT_ENTITY_NAME

FROMDM_COLUMNS_DOC DC,DM_INDEX_COLUMNS D

PLAN DCJOIN DWHERE D.COLUMN_NAME = OUTERJOIN (DC.COLUMN_NAME)AND D.TABLE_NAME = OUTERJOIN (DC.TABLE_NAME)AND D.COLUMN_POSITION = OUTERJOIN (1)WITH NOCOUNTER

A Well-Kept Secret:dm_columns_doc and dm_index_columns act as anall-inclusive table of contents.

When mapping front-end fields to back-end tables, this CCL can be of enormous help.Cerner Field Listing

Page 11: CCL Reports

IndexedCode SetField and table Parent

Result: A listing of all fields, code set links, indexes, and parent table links. Load this into Access where you can then sort and do searches.

Page 12: CCL Reports

Case Study

Request:

A clinician has requested a report of all CBC orders for 24 hours that have a stat collection priority.

Looking for clues:

Ask which Cerner application is being used, then open that application to gain additional pieces of information. This information can narrow the search of the 250,000+ fields in the Access database.

Page 13: CCL Reports

Looking for clues:

Clue 1: Department Order Entry is used

Clue 2:Stat falls under Collection Priority

Page 14: CCL Reports

SELECT CV1.CODE_SET,CV1.DISPLAY, CV2.DISPLAY, CV3.DISPLAY, CV4.DISPLAY

FROMCODE_VALUE CV1, CODE_VALUE CV2, CODE_VALUE CV3,CODE_VALUE CV4

PLAN CV1WHERE CV1.DISPLAY_KEY = "DRAW" AND CV1.ACTIVE_IND = 1JOIN CV2WHERE CV2.DISPLAY_KEY = "ROUTINE" AND CV2.ACTIVE_IND = 1AND CV2.CODE_SET = CV1.CODE_SETJOIN CV3WHERE CV3.DISPLAY_KEY = "NOW" AND CV3.ACTIVE_IND = 1AND CV3.CODE_SET = CV2.CODE_SETJOIN CV4WHERE CV4.DISPLAY_KEY = "TIMED" AND CV4.ACTIVE_IND = 1AND CV4.CODE_SET = CV3.CODE_SETWITH NOCOUNTER

Based on Clue 2, look for a code set that has the same entries as the drop-down.

Code Set Listing

Page 15: CCL Reports

Clue 3:Code set 2054 is the one that contains these 4 entries.

Page 16: CCL Reports

Go to Access:Using clue 3, go to the Access database. Sort by code_set to see all fields linked to code_set 2054.

Page 17: CCL Reports

Clue 4:The original list of 250k fields has dropped down to about 20 fields. Based on table name, order_laboratory is a good guess.

Page 18: CCL Reports

Clue 5:Using Access, it is easy to find indexed date fields. Based once again on table name, orders would be a good guess.

Page 19: CCL Reports

DECLARE STAT_VAR = F8SET STAT_VAR = UAR_GET_CODE_BY (“DISPLAYKEY”, 2054, “STAT”)DECLARE CBC_VAR = F8SET CBC_VAR = UAR_GET_CODE_BY (“DISPLAYKEY”, 200, “CBC”)

SELECT O_CATALOG_DISP = UAR_GET_CODE_DISPLAY (O.CATALOG_CD),O.ORIG_ORDER_DT_TM,O.PERSON_ID,O.ORDER_ID,OL_COLLECTION_PRIORITY_DISP = UAR_GET_CODE_DISPLAY (OL.COLLECTION_PRIORITY_CD)

FROM ORDERS O, ORDER_LABORATORY OLPLAN OWHERE O.ORIG_ORDER_DT_TM > CNVTDATETIME (CURDATE, 0)AND O.CATALOG_CD = CBC_VARJOIN OLWHERE OL.ORDER_ID = O.ORDER_IDAND OL.COLLECTION_PRIORITY_CD = STAT_VARWITH NOCOUNTER

Result:Using both ‘best guesses’, this is how to structure the ccl. To test, place an order in Department Order Entry, and then run this ccl.

Case Study Response

Page 20: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 21: CCL Reports

CCL Bad Example:• No indication of report author• Report description, purpose is missing• Table listing is not included• No history of report changes• Required to read code itself

Page 22: CCL Reports

CCL Good Example:• Author and release date are listed• Purpose and general description are included, as well as a table listing• Further down is a list of prompts and maintenance schedule

Page 23: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 24: CCL Reports

Report Library:• holds all ccl reports and prompts• holds a complete change history• allows version control and ability to restore previous versions

Microsoft Visual Source Safe

Page 25: CCL Reports

Objectives

1. Keep the end-user in mind

2. Keep the report-writer in minda. map front-end fields

to back-end tables

b. use comments, documentation

c. create a report library

3. Keep the system in mind

Page 26: CCL Reports
Page 27: CCL Reports

CCLQuery: Shows the order in which tables are joined. For each join, you can see if the index is unique (the best), a range scan (ok), or a full table scan (awful).

CCLQuery: Report Optimizing

Page 28: CCL Reports

CCL Reports

Questions? Comments?Bookings?

Call my agent.

Sue [email protected]