Narrative text

In this section Hide

If the source data contains narrative text, you can include the narrative on the Case Details page. There are several ways that narrative text may be set up in the source data.

Assume that there are three categories of narrative text (CAT_A, CAT_B, and CAT_C) and two report IDs (10, 11). The simplest way that narrative text may be stored is for each category of narrative text to have its own column in the source database table, with one row per report ID. This approach is used in the following example:


REPORT_ID

CAT_A

CAT_B

CAT_C

10

This is category A narrative text for case 10.

This is category B narrative text for case 10.

This is category C narrative text for case 10.

11

This is category A narrative text for case 11.

This is category B narrative text for case 11.

This is category C narrative text for case 11.

For the NARRATIVE type in the drilldown map table, you would specify CAT_A, CAT_B, and CAT_C as display columns.

Concatenation of narrative text

If the narrative text for a column is too long to fit into a single column of data type VARCHAR2, it may be split it up between columns that have the same root name and a two-digit sequence number. In the following example, the narrative text for case ID 10 is stored in three columns:


REPORT_ID

CAT_A01

CAT_A02

CAT_A03

CAT_B

CAT_C

10

This is category A narrative text for case 10.

It is too long to fit into one column of the database table.

So it is split between three columns.

This is category B narrative text for case 10.

This is category C narrative text for case 10.

11

This is category A narrative text for case 11.

 

 

This is category B narrative text for case 11.

This is category C narrative text for case 11

For the NARRATIVE type in the drilldown map table, you would specify CAT_A, CAT_B, and CAT_C as display columns. Empirica Signal would concatenate values in the CAT_A01, CAT_A02, and CAT_A03 columns because their root name is the same (CAT_A). Values are concatenated in the order of the columns' two-digit sequence numbers.

Narrative text spanning multiple rows

In the source data, there may be a column that stores the category and another column that stores the narrative text. If there are multiple rows per report ID, you must use the option "NARRATIVE spans multiple rows" in the drilldown map table for the NARRATIVE type. This approach is used in the following example:


REPORT_ID

NARRATIVE_CATEGORY

NARRATIVE_TEXT

10

CAT_A

This is category A narrative text for case 10.

10

CAT_B

This is category B narrative text for case 10.

10

CAT_C

This is category C narrative text for case 10.

11

CAT_A

This is category A narrative text for case 11.

11

CAT_B

This is category B narrative text for case 11.

11

CAT_C

This is category C narrative text for case 11.

For narrative data stored this way, the Oracle data type of the column storing the narrative text is typically CLOB (character large object), so there is no restriction on narrative length. For the NARRATIVE type in the drilldown map table, you would specify NARRATIVE_CATEGORY and NARRATIVE_TEXT as display columns and you would check NARRATIVE spans multiple rows.