27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B. STEP 2: Model Level<br />

This section introduces a model as a simple case study that<br />

specifies the structure, com monalities, and variabilities of tw o<br />

types of XM L messages respectively conformed HL 7 CDA 2<br />

and openEHR standards 3 . An XML product line then w ill be<br />

generated after the model is interpreted by the inte rpreter<br />

described in Section 3.C-F. Fi gure 2 shows the summary of an<br />

EMR product line modeled by FODA. For space consideration,<br />

please find model examples at [8].<br />

TABLE I. VECTORS TO STORE XML ELEMENET PROPERTIES.<br />

Index Element Parent Index Parent Index<br />

0 ObservationEvent -1 -1<br />

1 code 0 5<br />

2 Value 0 0<br />

3 Name - 0<br />

4 Mappings - 3<br />

5 Target - 4<br />

6 terminology - 5<br />

7 match - 4<br />

8 value - 3<br />

Figure 2. Summary of an HL7-CDA-and-openEHR product line.<br />

C. STEP 3:Interpreter Level -- Create Data Structures<br />

In order to keep track where each XM L element is located<br />

and its relationships to other elements before and after applying<br />

feature relationships, tw o 4 two-dimensional vectors are<br />

introduced (For space consideration, Table 1 consists of two<br />

vectors which are distinguished by Columns 3 and 4). Column<br />

2 stores a list of Element objects, each of which contains its<br />

feature relationship to its parent elem ent, (i.e. m andatory,<br />

optional, one-of, or more-of). Columns 3 and 4 respectively<br />

store the parent indices of ele ments of two standards. Note that<br />

Column 3 has three integers. It is because Indices 3 to 8 should<br />

only be included in the openEHR message by using Add. When<br />

the six newly introduced feature relationships are identified in<br />

the model, Column 4 should be updated accordingly. For<br />

example, Add, Fold, Make_Tag, and Add_Remove with<br />

Add_Attr value may increase an element’s parent level if the<br />

structure is changed; and Inverse and Remove may decrease an<br />

element’s parent index. The table not only assists in updating<br />

elements’ properties and relationships but also finding where to<br />

insert ending tags. Due to space consideration, please refer to<br />

[8] for the algorithm of creating data structures.<br />

D. STEP 4: Interpreter Level -- Create FDL Files<br />

Feature Description Language (FDL) [6] is a domainspecific<br />

language that describes feature models. Hence, STEP 4<br />

is to generate FDL programs based on the results of STEP 3<br />

(i.e., properties stored in Table 1) so that the FDL Rule Engine<br />

[6] in STEP 5 can execute the FDL programs. The interpreter<br />

starts from the root element and then retrieves those elements<br />

2 Health Level 7. http://www.hl7.org.<br />

3 openEHR. http://www.openehr.org.<br />

4 There could be more than two vectors. The reason “two” are created is<br />

because the product line conforms to two standards.<br />

whose parent index indicates that they are the child elem ents of<br />

the current element being processed. Then depending on the<br />

parent-child feature relationshi p stored in the elements, the<br />

interpreter generates the textual representation for the elem ent.<br />

The processes are repeated for each element.<br />

E. STEP 5: Interpreter Level -- Execute FDL Rule Engine<br />

The FDL Rule Engine [6] is used to normalize and generate<br />

all the possible com binations of XML elements from a given<br />

FDL program. The output is a comma-separated list of XM L<br />

elements for each unique possible combination.<br />

F. STEP 6: Interpreter Level -- Generate an XML Product Line<br />

The outputs from the FDL Rule Engine show all the<br />

possible combinations of XM L elements based on feature<br />

relationships, both newly introduced and FODA’ s. However,<br />

there is no w ay to relate X ML elements to their parent<br />

elements from the outputs, as they do not show parent<br />

elements at all. Such outputs do not offer any idea of the levels<br />

at which each element is present either. All this information is<br />

necessary in order to generate a valid XM L product line that<br />

conforms to HL7 CDA and openEHR. In order to solve this<br />

challenge, the vectors generated in STEP 3 are used. The<br />

interpreter parses one com bination of elements at a time. It<br />

traverses a vector and checks if an element is present in the<br />

current string of the combination of elements being<br />

considered. If yes, it adds all the child elem ents and attributes<br />

for the current element. Thus, the parent elements are added to<br />

the message. The interpreter then checks if any attribute is<br />

supposed to be converted into an element by checking<br />

Make_Tag property value and converts it into the element<br />

form and appends it to the m essage. It also checks if any<br />

attribute is to be added or removed using Add_Remove. The<br />

process is recursively repeated for every entry in the vector<br />

and an X ML message is then generated. T he interpreter<br />

continues to generate the rest of the XM L messages based on<br />

the number of combinations from the FDL Rule Engine.<br />

G. A Case Study<br />

This section introduces a m ore complicated case study that<br />

consists of all the feature relati onships mentioned in the paper.<br />

539

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!