You are on page 1of 14

Radiology MRRT Report to FHIR

Conversion Module

Introduction

User Manual

Installation

Build FHIR 0.91 module


1. git clone https://github.com/openmrs/openmrs-module-fhir/tree/0.91
2. cd into directory and git fetch
3. git checkout tags/0.91
4. mvn clean package

Build RAD-FHIR module


1. git clone https://github.com/maany/openmrs-module-radiology-fhir-support
2. cd into directory
3. mvn clean package

Further Instructions
Start Demo Instance of OpenMRS 1.11.4. If you only wish to test this module do not use a
production database (Demo data makes entries into a number of tables and also creates
new tables for storing MRRTTemplates)

1. Install FHIR 0.91


2. Install Radiology FHIR Support module (after installing FHIR to avoid dependency
issues)

If you face errors when installing/ running the module and the log gives the following exception :
java.lang.NoClassDefFoundError: org/jaxen/JaxenException.
1. Goto Tomcat webapps folder (In Linux : /var/lib/tomcat7/webapps/)
2. Cd into the ./openmrs/WEB-INF/lib
3. Manually paste jaxen_1.1.6.jar
4. Restart tomcat
5. Read more : https://talk.openmrs.org/t/java-lang-noclassdeffounderror-org-jaxen-
jaxenexception-in-module/6765

Now the testing environment should be set. Judy is also hosting a test-instance online at
http://162.243.230.92:8080/openmrs

Create MRRT Templates


1. Login into OpenMRS at http://162.243.230.92:8080/openmrs
2. Head over to Administration section
3. Select MRRT Reports from menu under Radiology FHIR Support Module
(highlighted)

4. Select Create new MRRT report to open the report creation page
5. Enter the name of the report and the its xml representation
6. Hit the create button
a. If the template does not conform to the html5 standards described by MRRT
specifications, generation of Diagnostic Reports will fail later.
7. Head over to the Admin page and select MRRT Reports to see the newly created
template listed with the other existing templates
8. Select the encounter_uuid field corresponding to the created template and fill up the
details about the encounter (optional). This step allows for more comprehensive
integration of the MRRT template with other OpenMRS services layer methods

Fig : Edit OpenMRS Encounter corresponding to the newly created MRRT report

Edit MRRT Templates


1. Head over to your OpenMRS installation or to http://162.243.230.92:8080/openmrs
2. Select the Administration tab and then select MRRT Reports under the Radiology FHIR
Support Module
3. Select the template you want to edit to open up the view/edit page
4. Make the changes in the name or the xml for the MRRT report
5. Click save changes to save the changes
View Diagnostic Reports
The main feature of the Radiology FHIR module is to map MRRT templates to FHIR Diagnostic
reports. Once you have created the MRRT templates/ reports, you can generate the
corresponding FHIR Diagnostic Reports with help of the following instructions :

1. Head over to your OpenMRS installation or to http://162.243.230.92:8080/openmrs


2. Select the Administration tab and then select MRRT Reports under the Radiology FHIR
Support Module
3. Copy the encounter_uuid for the MRRT report you wish to convert. Let say it’s
{encounter_uuid}
4. Make the following REST call to the FHIR module
a. /openmrs/ws/fhir/DiagnosticReport/{encounter_uuid}
b. If the xml saved in “Create MRRT Templates” section conforms to the standards
described IHE in the MRRT template specifications, you will get the FHIR
DiagnosticReport representation of MRRT report, else scan the logs to check
what modifications need to be made.

API Docs
The API is organized as follows :
1. HTTP Request : The FHIR request to fetch MRRT template. Format of the request url is
/openmrs/ws/fhir/DiagnosticReport/{encounter_uuid}. The encounter uuid can be found
from the View Diagnostic Report section
2. FHIR Module :
a. HAPI FHIR Server : The HAPI processed the incoming request and identifies it
being a DIagnosticReport request
b. FHIR module service infrastructure : FHIR module does invokes the
DiagnosticReportService
c. DiagnosticReportService : It identifies the enounter object from the
encounter_uuid. It then inspects the encounter_type
d. FHIRDiagnosticUtil : It handles invoking the MRRTTemplateHandler methods to
fetch the FHIR Diagnostic Report
3. Radiology FHIR Support Module :
a. MRRTTemplateHandler: Links FHIR module and Radiology FHIR Support
module
b. MRRTToFHIRService: Converts MRRT templates to FHIR Diagnostic Reports
and sends them to MRRTTemplate handler that exposes it to the FHIR module
c. XPathMapper: Finds fields in MRRT templates using XPath and maps them to
fields in FHIR Diagnostic Report based on mapping scheme provided
d. DiagnosticReportMRRTAdapter: Isolates mapping process to allow support for
different mapping schemes and techniques in the future
e. RadlexUtil: Assists in decoding Radlex codes

Logic behind the Module


The trial implementation of MRRT sepcifications by IHE is given here :
http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_Suppl_MRRT.pdf
The approximate representation of MRRT Templates is shown in the diagram below. The
modules code ensures that this structure is followed and that html tags are properly formatted.

Example of Successful Mappings

XML representation of MRRT Template :


<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'/>hmm
<meta content='Chest Xray' name='dcterms.title'/>
<meta content='Chest Xray template :: Authored by Kahn CE Jr'
name='dcterms.descript_mrrtion'/>
<meta content='http://www.radreport.org/template/0000102' name='dcterms.identifier'/>
<meta content='en' name='dcterms.language'/>
<meta content='IMAGE_REPORT_TEMPLATE' name='dcterms.type'/>
<meta content='Radiological Society of North America (RSNA)' name='dcterms.publisher'/>
<meta content='May be used gratis, subject to license agreement' name='dcterms.rights'/>
<meta content='http://www.radreport.org/license.pdf' name='dcterms.license'/>
<meta content='2012-03-28' name='dcterms.date'/>
<meta content='Kahn CE Jr' name='dcterms.creator'/>
<meta content='Kahn CE Jr [editor]' name='dcterms.contributor'/>
<meta content='Medical College of Wisconsin (MCW)' name='dcterms.contributor'/>
<link rel='stylesheet' type='text/css' href='IHE_Template_Style.css'/>
<!-- The absolute link to the CSS file is http://www.radreport.org/html/IHE_Template_Style.css --
>
<script_mrrt type='text/xml'>
<!--
<template_attributes>
<top-level-flag>true</top-level-flag>
<status>ACTIVE</status>
<coding_schemes>
<coding_scheme name='RadLex' designator='2.16.840.1.113883.6.256' />
<coding_scheme name='SNOMEDCT' designator='2.16.840.1.113883.6.96' />
<coding_scheme name='LOINC' designator='2.16.840.1.113883.6.1' />
</coding_schemes>
<term>
<code meaning='projection radiography' value='RID10345' scheme='RadLex'/>
</term>
<term>
<code meaning='thorax' value='RID1243' scheme='RadLex'/>
</term>
<coded_content>
<entry ORIGTXT='T102_2'>
<term>
<code meaning='procedure' value='RID1559' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_7'>
<term>
<code meaning='clinical information' value='RID13166' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_12'>
<term>
<code meaning='comparison' value='RID28483' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_15'>
<term>
<code meaning='heart' value='RID1385' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_17'>
<term>
<code meaning='lungs' value='RID13437' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_20'>
<term>
<code meaning='set of bones' value='RID28569' scheme='RadLex'/>
</term>
</entry>
<entry ORIGTXT='T102_23'>
<term>
<code meaning='impression section' value='RID13170' scheme='RadLex'/>
</term>
</entry>
</coded_content>
</template_attributes>
-->
</script_mrrt>
<title>Chest Xray</title>
</head>
<body>
<section data-section-name='Procedure'>
<header class='level1'>Chest Xray</header>
<p>
<textarea id='T102_2' name='Procedure'>PA and lateral views. </textarea>
</p>
</section>
<section data-section-name='Clinical information'>
<header class='level1'>Clinical information</header>
<p>
<textarea id='T102_7' name='Clinical information'> </textarea>
</p>
</section>
<section data-section-name='Comparison'>
<header class='level1'>Comparison</header>
<p>
<textarea id='T102_12' name='Comparison'>None. </textarea>
</p>
</section>
<section data-section-name='Findings'>
<header class='level1'>Findings</header>
<p>
<label for='T102_15'>Heart:</label>
<input type='text' id='T102_15' name='Heart' value='Normal.'/>
</p>
<p>
<label for='T102_17'>Lungs:</label>
<input type='text' id='T102_17' name='Lungs' value='Normal.'/>
</p>
<p>
<label for='T102_20'>Bones:</label>
<input type='text' id='T102_20' name='Bones' value='Normal.'/>
</p>
</section>
<section data-section-name='Impression'>
<header class='level1'>Impression</header>
<p>
<textarea id='T102_23' name='Impression'>No acute disease. </textarea>
</p>
</section>
</body>
</html>

Insights into Mapping Scheme used :

XPath/ Code/ MRRT field FHIR Diagnostic Report field

//html/head/script/template_attributes/status status

//html/head/title category

RID13159 subject

Radlex code processing result

<impression> and Radlex code based search conclusion


XPath/ Code/ MRRT field FHIR Diagnostic Report field

//html/head/script/template_attributes/status status

//html/head/title category

Radlex code processing result

<impression> and Radlex code based search conclusion

Diagnostic Report :
{
"resourceType":"DiagnosticReport",
"id":"59b01f98-3711-46d8-85ef-387023129b16",
"contained":[
{
"resourceType":"Observation",
"id":"1",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID1243",
"display":"thorax"
}
]
}
},
{
"resourceType":"Observation",
"id":"2",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID13170",
"display":"impression section"
}
]
}
},
{
"resourceType":"Observation",
"id":"3",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID28483",
"display":"comparison"
}
]
}
},
{
"resourceType":"Observation",
"id":"4",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID1385",
"display":"heart"
}
]
},
"valueString":"Normal."
},
{
"resourceType":"Observation",
"id":"5",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID13166",
"display":"clinical information"
}
]
}
},
{
"resourceType":"Observation",
"id":"6",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID10345",
"display":"projection radiography"
}
]
}
},
{
"resourceType":"Observation",
"id":"7",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID28569",
"display":"set of bones"
}
]
},
"valueString":"Normal."
},
{
"resourceType":"Observation",
"id":"8",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID13437",
"display":"lungs"
}
]
},
"valueString":"Normal."
},
{
"resourceType":"Observation",
"id":"9",
"code":{
"coding":[
{
"system":"RadLex",
"code":"RID1559",
"display":"procedure"
}
]
}
}
],
"status":"final",
"serviceCategory":{
"coding":[
{
"system":"http://hl7.org/fhir/v2/0074",
"code":"RAD"
}
]
},
"result":[
{
"reference":"#1"
},
{
"reference":"#2"
},
{
"reference":"#3"
},
{
"reference":"#4"
},
{
"reference":"#5"
},
{
"reference":"#6"
},
{
"reference":"#7"
},
{
"reference":"#8"
},
{
"reference":"#9"
}
],
"conclusion":"No acute disease. "
}

Working Links
MR Neck http://162.243.230.92:8080/openmrs/ws/fhir/DiagnosticReport/cc42af4c-0142-4c7d-
b061-049688c34cf0
Pediatric Swallow Study :
http://162.243.230.92:8080/openmrs/ws/fhir/DiagnosticReport/ebb0c0a5-22c5-4ef9-b958-
3c3af483ba12
Chest X-Ray
http://162.243.230.92:8080/openmrs/ws/fhir/DiagnosticReport/c3335d63-80bb-47d2-835c-
011ea2050c90
CT Pelvis http://162.243.230.92:8080/openmrs/ws/fhir/DiagnosticReport/7aada6b5-36e6-4954-
befe-224c5e079a9b

http://162.243.230.92:8080/openmrs/ws/fhir/DiagnosticReport/c25fe59f-343a-4cb7-b132-
fe41d36dc7ea

Examples of Templates with Incorrect Formatting

CT Lung Nodule Template


http://www.radreport.org/template/0000012

Error : The template does not define <entry> tags in <coded_content>, which is mandatory as
per the specifications

You might also like