We are currently working on the forum. For the short-term, all forum content will be in read-only format. We apologize for the interruption and look forward to collaborating with you shortly. All the best in your research!

enrolling a subject into OpenClinica using Mirth and 3.0's SOAP service ...

enrolling a subject into OpenClinica using Mirth and 3.0's SOAP service ...
Hi,
Attached (I hope) is a Mirth channel that enrolls a subject into OpenClinica
using 3.0's SOAP services. The password in the SOAP envelope has been redacted.
To get this to work on my local machine, I had to use stunnel4 to route messages from port
8445 to 8443 where I have OpenClinica running with SSL. I had to do
this because Mirth doesn't support https directly unless you buy
an appliance.
What happens is this: Mirth reads a file describing a study subject,
parses the data, generates a corresponding SOAP message and then shoots
it off to OpenClinica which then enrolls the patient.
I think the demo significant, because it shows how OpenClinica
can be integrated with powerful middleware already in use in hospitals
and labs everywhere.
Thanks!

mirth-to-openclinica.xml

6b1fd69f-929b-4551-9dfe-cd4032f4750f
mirth-to-openclinica

false
1.8.0.4126


SystemV/EST5EDT

2

sourceConnector

0
soap.txt
anonymous
anonymous


interval
DEFAULT_ENCODING
file
/home/csmith/Desktop/data/
10000
1
File Reader
0
1
0
0
date

1
0




0
row_column1
var mapping;try { mapping = msg['row']['column1'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column1', validate( mapping , '', new Array()));
Mapper


Variable
row_column1


DefaultValue



RegularExpressions



Mapping
msg['row']['column1'].toString()


isGlobal
channel




1
row_column2
var mapping;try { mapping = msg['row']['column2'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column2', validate( mapping , '', new Array()));
Mapper


Variable
row_column2


DefaultValue



Mapping
msg['row']['column2'].toString()


RegularExpressions



isGlobal
channel




2
row_column3
var mapping;try { mapping = msg['row']['column3'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column3', validate( mapping , '', new Array()));
Mapper


Variable
row_column3


DefaultValue



Mapping
msg['row']['column3'].toString()


RegularExpressions



isGlobal
channel




3
row_column4
var mapping;try { mapping = msg['row']['column4'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column4', validate( mapping , '', new Array()));
Mapper


Variable
row_column4


DefaultValue



Mapping
msg['row']['column4'].toString()


RegularExpressions



isGlobal
channel




4
row_column5
var mapping;try { mapping = msg['row']['column5'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column5', validate( mapping , '', new Array()));
Mapper


Variable
row_column5


DefaultValue



Mapping
msg['row']['column5'].toString()


RegularExpressions



isGlobal
channel




5
row_column6
var mapping;try { mapping = msg['row']['column6'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column6', validate( mapping , '', new Array()));
Mapper


Variable
row_column6


DefaultValue



Mapping
msg['row']['column6'].toString()


RegularExpressions



isGlobal
channel




6
row_column7
var mapping;try { mapping = msg['row']['column7'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column7', validate( mapping , '', new Array()));
Mapper


Variable
row_column7


DefaultValue



Mapping
msg['row']['column7'].toString()


RegularExpressions



isGlobal
channel




7
row_column8
var mapping;try { mapping = msg['row']['column8'].toString(); }catch (e) { logger.error(e); mapping = '';}channelMap.put('row_column8', validate( mapping , '', new Array()));
Mapper


Variable
row_column8


DefaultValue



Mapping
msg['row']['column8'].toString()


RegularExpressions



isGlobal
channel




123456,12345,abc,2007-01-01,m,1900-01-01,1900,default-study


DELIMITED
XML






File Reader
SOURCE
true



Destination 1

create
http://localhost:8445/alpha/ws/subject/v1/subject.wsdl
sink
H4sIAAAAAAAAAFvzloG1uIhBIzk/V688NakoNTE5Qy83s6gESOanpObolRfrhQe7pKZl5mWWZObn
HTqxXXK6fcsjJgZmHwYeoK6CnNSKkMqC1OISBn6frMSyRP3Skswcfd/EAmsfBq78gtSiRJC+4kKG
OgZGHwah4tSisszkVNe8lIL8zLyS0CDPEgYhiMacxLx0/eCSosy8dOuKggKgswRB4nogA/U8Eosz
gIayst86eFgs4SIzA5MbA1dOfmKKW2JySX6RJwNnSUZRanFGfk5KRYG9AwMI8JRzAEkBELOiAAC+
7lTJ6gAAAA==
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:v1="http://openclinica.org/ws/subject/v1"&gt;
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;
<wsse:UsernameToken wsu:Id="UsernameToken-27777511" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
<wsse:Username>root</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">*****************</wsse:Password&gt;
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<v1:createRequest>
<v1:subject>
<v1:personId>${row_column1}</v1:personId>
<v1:studySubjectId>${row_column2}</v1:studySubjectId>
<v1:secondaryId>${row_column3}</v1:secondaryId>
<v1:enrollmentDate>${row_column4}</v1:enrollmentDate>
<v1:sex>${row_column5}</v1:sex>
<v1:dateOfBirth>${row_column6}</v1:dateOfBirth>
<v1:yearOfBirth>${row_column7}</v1:yearOfBirth>
</v1:subject>
<v1:study uniqueIdentifier="${row_column8}" />
</v1:createRequest>
</soapenv:Body>
</soapenv:Envelope>

http://localhost:8445/alpha/ws/subject/v1
SOAP Sender
0
0
http://localhost:8445/alpha/ws/subject/v1
10000
axis:http://localhost:8445/alpha/ws/subject/v1?method=create
0



XML
XML





SOAP Sender
DESTINATION
true



true
true
false
started
false
false
-1
false
false

// Modify the message variable below to pre process data
return message;
// This script executes once after a message has been processed
return;
// This script executes once when the mule engine is started
// You only have access to the globalMap here to persist data
return;
// This script executes once when the mule engine is stopped
// You only have access to the globalMap here to persist data
return;

Attachments:
mirth-to-openclinica.xml 15.2 KB
This discussion has been closed.