Medidata.RWS.NET Documentation Release 1.0 Matthew Koch, MSKCC Jul 18, 2018
MedidataRWSNET DocumentationRelease 10
Matthew Koch MSKCC
Jul 18 2018
Contents
1 Introduction 311 Assumptions 312 Acknowledgments 3
2 Getting Started 521 Installation 522 Basic Example 523 Miscellaneous Configuration 6
3 Topics 931 Authentication 932 Errors 9
4 Basic Requests 1141 VersionRequest() 1142 BuildVersionRequest() 1143 TwoHundredRequest() 1244 CacheFlushRequest() 12
5 Core Resources 1351 Clinical Data 1352 Clinical View Datasets 14
6 Using Builders 1961 Basic Example - Register a Subject 19
7 Indices and tables 21
i
ii
MedidataRWSNET Documentation Release 10
MedidataRWSNET is a comprehensive fluent NET API library for Medidata RAVE Web Services (RWS) It handlesa large portion of the boilerplate C code yoursquod normally have to write in order to communicate with RWS allowingyou to get up and running faster
Contents 1
MedidataRWSNET Documentation Release 10
2 Contents
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
Contents
1 Introduction 311 Assumptions 312 Acknowledgments 3
2 Getting Started 521 Installation 522 Basic Example 523 Miscellaneous Configuration 6
3 Topics 931 Authentication 932 Errors 9
4 Basic Requests 1141 VersionRequest() 1142 BuildVersionRequest() 1143 TwoHundredRequest() 1244 CacheFlushRequest() 12
5 Core Resources 1351 Clinical Data 1352 Clinical View Datasets 14
6 Using Builders 1961 Basic Example - Register a Subject 19
7 Indices and tables 21
i
ii
MedidataRWSNET Documentation Release 10
MedidataRWSNET is a comprehensive fluent NET API library for Medidata RAVE Web Services (RWS) It handlesa large portion of the boilerplate C code yoursquod normally have to write in order to communicate with RWS allowingyou to get up and running faster
Contents 1
MedidataRWSNET Documentation Release 10
2 Contents
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
ii
MedidataRWSNET Documentation Release 10
MedidataRWSNET is a comprehensive fluent NET API library for Medidata RAVE Web Services (RWS) It handlesa large portion of the boilerplate C code yoursquod normally have to write in order to communicate with RWS allowingyou to get up and running faster
Contents 1
MedidataRWSNET Documentation Release 10
2 Contents
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
MedidataRWSNET is a comprehensive fluent NET API library for Medidata RAVE Web Services (RWS) It handlesa large portion of the boilerplate C code yoursquod normally have to write in order to communicate with RWS allowingyou to get up and running faster
Contents 1
MedidataRWSNET Documentation Release 10
2 Contents
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
2 Contents
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 1
Introduction
11 Assumptions
This documentation assumes that the reader has a familiarity with the Medidata RAVE platform as well as a basic un-derstanding of RESTful Web Service concepts While the MedidataRWSNET library attempts to abstract away someof the typical HTTP communication mechanisms required when making typical web service requests the underlyingHTTP codes and raw request response data is still available to developers
12 Acknowledgments
The creation of this library wouldnrsquot have been possible without inspiration and examples from some fine folks atMedidata Solutions specifically Ian Sparks and Geoff Low In many ways the library has taken some inspirationfrom the Python flavored ldquorwslibrdquo available on Github httpsgithubcommdsolrwslib
3
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
4 Chapter 1 Introduction
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 2
Getting Started
21 Installation
Install MedidataRWSNET via NuGet nuget install MedidataRWSNET
or via the Package Manager Console Install-Package MedidataRWSNET
22 Basic Example
At the most basic level communicating with Medidata RAVE using MedidataRWSNET involves
1 Creating a connection
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate RAVE username RAVE password)
The above code will create a RwsConnection object to the ldquoinnovaterdquo RAVE instance (subdomain) - httpsinnovatemdsolcom Yoursquod substitute your RAVE instance subdomain here The RAVE username and RAVE password param-eters should reference a dedicated RAVE account you intend to use for web service activities
2 Creating a request
using MedidataRWSCoreRequestsDatasetsvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
3 Sending the request
var response = connectionSendRequest(datasetRequest) as RWSResponse
4 Dealing with the responseexception
5
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
ConsoleWrite(responseRawXMLString())
5 Putting this all together we have the following
using MedidataRWSCoreRequestsDatasetsusing MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)
Create a requestvar datasetRequest = new SubjectDatasetRequest(MediFlex PROD subject_keyrarr˓SUBJECT001 formOid HEM)
Send the request get a responsevar response = connectionSendRequest(datasetRequest) as RWSResponse
Write the response XML string to the consoleConsoleWrite(responseRawXMLString())
The above steps outline how to retrieve data for SUBJECT001rsquos HEM form in the MediFlex study (specifically thePROD environment)
23 Miscellaneous Configuration
When working with MedidataRWSNET you may wish to configure the connection to RWS beyond the defaultsettings Options for doing so are described below
231 Virtual Directory
When you make requests to RAVE Web services the URL you communicate with follows a specific pattern Thedomain name will always be ldquomdsolcomrdquo and the protocol will always be ldquohttpsrdquo The sub-domain amp virtualdirectory are configurable The default virtual directory is ldquoRaveWebServicesrdquo This means that when you create anew connection to innovate using the default virtual directory yoursquoll get the following
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE password)connectionbase_url httpsinnovatemdsolcomRaveWebServices
If instead yoursquod like to change the virtual directory to a custom one you can pass an additional parameter through theRwsConnection constructor
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username RAVE passwordrarr˓CustomVirtualDirectory)connectionbase_url httpsinnovatemdsolcomCustomVirtualDirectory
Note that this is provided as a convenience and the default virtual directory will be preferable in most scenarios
6 Chapter 2 Getting Started
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
232 Timeouts
If supplied the timeout of the request in milliseconds If the request takes longer than the timeout value an exceptionwill be thrown
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate RAVE username timeout 1000)
23 Miscellaneous Configuration 7
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
8 Chapter 2 Getting Started
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 3
Topics
31 Authentication
In order to use Medidata RAVE web services you must authenticate your web service requests You can do this bysupplying both a RAVE username and RAVE password parameter when you establish a RwsConnection objectThis usernamepassword should reference a dedicated RAVE account you intend to use for web service activities
For example
using MedidataRWSCoreRequestsvar connection = new RwsConnection(innovate rwsUser1 password1)
The above code will create a RwsConnection object and point it to the innovate RAVE instance (subdomain) -httpsinnovatemdsolcom The username and password you provide are concatenated base64-encodedand passed in the Authorization HTTP header each time you make a request using the connection object as follows
Authorization Basic cndzVXNlcjE6cGFzc3dvcmQx
Do not share your username password in publicly accessible areas such GitHub client-side code and so forthAuthentication is only required when establishing a new RwsConnection object The MedidataRWSNET librarywill then automatically send the appropriate Authorization header for each request made with this connection objectAPI requests without authentication will fail
32 Errors
Medidata RAVE web services uses HTTP response codes to indicate success or failure of an API request Generallyspeaking HTTP codes in the ranges below mean the following
bull 2xx - success
bull 4xx - an error that failed given the information provided
bull 5xx - an error with Medidatarsquos servers
9
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
Not all errors map cleanly onto HTTP response codes however Medidata usually attempts to return a ldquoRWS ReasonCoderdquo in addition to the conventional HTTP code to explain in more detail about what went wrong To see a fulllisting of these codes refer to Rave Web Services Error Responses - Complete List
321 Handling errors
The MedidataRWSNET library can raise an exception for a variety reasons such as invalid parameters authenticationerrors and network unavailability We recommend writing code that gracefully handles all possible API exceptions
10 Chapter 3 Topics
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 4
Basic Requests
MedidataRWSNET provides some basic diagnostic health check API requests out of the box
41 VersionRequest()
Returns the RWS version number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversion
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new VersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)1150
42 BuildVersionRequest()
Returns the internal RWS build number Specifically this is the textual response returned when calling httpssubdomain mdsolcomRaveWebServicesversionbuild
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
(continues on next page)
11
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new BuildVersionRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)565335
43 TwoHundredRequest()
Returns the html document (along with a 200 HTTP response code) that contains information about the MAuth con-figuration of Rave Web Services with the given configuration Specifically this is the html response returned whencalling https subdomain mdsolcomRaveWebServicestwohundred
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate) no authentication required
Send the request get a responsevar response = connectionSendRequest(new TwoHundredRequest()) as RWSTextResponse
Write the response text to the consoleConsoleWrite(responseResponseText)ltDOCTYPE htmlgtrnlthtmlgtrnltheadgtltscript
44 CacheFlushRequest()
Send a request to flush the RWS cache Typically this is used to immediately implement configuration changesin RWS Under normal circumstances this request is unnecessary as RAVE and RWS manage their own cachingmechanisms automatically Specifically this is the equivalent of calling https subdomain mdsolcomRaveWebServiceswebserviceaspxCacheFlush
using MedidataRWSCoreRequests
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication is required
Send the request get a responsevar response = connectionSendRequest(new CacheFlushRequest()) as RWSResponse
Write the response text to the consoleConsoleWrite(responseIsTransactionSuccessful)true
12 Chapter 4 Basic Requests
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 5
Core Resources
51 Clinical Data
Often times yoursquoll want to work with the clinical data of your studies The MedidataRWSNET library provides sev-eral requests for extracting clinical data (via RAVE ldquoClinical Viewsrdquo) or POSTing clinical data to the RAVE platform
511 ClinicalStudiesRequest
Returns a list of EDC studies (as a RWSStudies object) Excludes studies that you (the authenticated user) are notassociated with
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new ClinicalStudiesRequest()) as RWSStudies
Write the study list to the consoleforeach (var s in response)
ConsoleWrite(sOID + rn)Mediflex(Prod)Mediflex(Dev)PlaceboTest(Prod)
13
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
512 StudySubjectsRequest
Returns a listing of all the subjects in a study (as a RWSSubjects object) optionally including those currentlyinactive or deleted Clinical data for the subjects is not included in the response
This is the equivalent of calling httpssubdomainmdsolcomstudiesstudy-oidSubjects[status=allampinclude=inactive|inactiveAndDeleted]
Parameters
Parameter Description Manda-tory
study-oid The study name Yesstatus=true | false If true add subject level workflow status to the response (if
present)No
include= inactive | deleted | inac-tiveAndDeleted
Will include active inactive andor deleted subjects in the re-sponse
No
subjectKeyType= SubjectName |SubjectUUID
Whether RWS should return the unique identifier (UUID) orthe subject name
No
links=true | false If true includes ldquodeep linkrdquo(s) (eg URLs) to the subject pagein Rave in the response
No
Example
using MedidataRWSCoreRequestsImplementations
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudySubjectsRequest(Mediflex Prod))rarr˓as RWSSubjects
Write each subject key to the consoleforeach (var s in response)
ConsoleWrite(sSubjectKey + rn) SUBJECT001 SUBJECT002 SUBJECT003
52 Clinical View Datasets
In addition to the above requests Medidata RAVE Web Services allows for the extraction of clinical data in the formof ldquoClinical Viewsrdquo - that is RAVE database views There are 3 ldquoDatasetsrdquo available that represent different subsetsof clinical data for your studies
14 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
521 StudyDatasetRequest
Clinical data in ODM format for the given study environment This data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)datasets regular|raw formoid options
Example
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new StudyDatasetRequest(Mediflex Prodrarr˓dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=92747321-c8b3-4a07-a874-0ecb53153f20rarr˓CreationDateTime=2017-06-05T130933202-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gt
ltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gtltSubjectData SubjectKey=1gt
ltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T140900rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-13T163400rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
(continues on next page)
52 Clinical View Datasets 15
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-05-09T185200rarr˓gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagt
ltODMgt
522 SubjectDatasetRequest
Clinical data in ODM format for the given study environment for a single subject Similar toStudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)subjects subjectkey datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
Send the request get a responsevar response = connectionSendRequest(new SubjectDatasetRequest(Mediflex Prodrarr˓subject_key 1 dataset_type regular)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
(continues on next page)
16 Chapter 5 Core Resources
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
(continued from previous page)
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=ABX FormRepeatKey=1gtltItemGroupData ItemGroupOID=ABX_LOG_LINEgt
ltItemData ItemOID=ABXABXDATE Value=2017-04-25 gtltItemData ItemOID=ABXMODALITY Value=2 gt
ltItemGroupDatagtltFormDatagt
ltStudyEventDatagtltSubjectDatagt
ltClinicalDatagtltClinicalData StudyOID=Mediflex(Prod) MetaDataVersionOID=1gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=BONEMARROW FormRepeatKey=1gtltItemGroupData ItemGroupOID=BONEMARROW_LOG_LINEgt
ltItemData ItemOID=BONEMARROWVISITDAT Value=2015-04-24 gtltItemData ItemOID=BONEMARROWCHEMSAMPLE Value=1 gtltItemData ItemOID=BONEMARROWBMPB_COLLECT Value=1 gt
ltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
523 VersionDatasetRequest
Clinical data in ODM format for the given study environment for a single RAVE study version for all subjectsSimilar to StudyDatasetRequest this data can be optionally filtered by a specific Form
This is the equivalent of calling httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw options
or to filter the data by form httpssubdomainmdsolcomstudiesproject(environment)versions version_id datasets regular|raw formoid options
using MedidataRWSCoreRequestsusing MedidataRWSCoreRequestsDatasets
Create a connectionvar connection = new RwsConnection(innovate username password) rarr˓authentication required
(continues on next page)
52 Clinical View Datasets 17
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
(continued from previous page)
Send the request get a responsevar response = connectionSendRequest(new VersionDatasetRequest(project_namerarr˓Mediflex environment_name Dev version_oid 999)) as RWSResponse
Write the XML response to the console (see XML below)ConsoleWrite(responseRawXMLString())
Note the MetaDataVersionOID value in the XML response
ltxml version=10 encoding=utf-8gtltODM FileType=Snapshot FileOID=9035596c-f090-4030-860a-0ed27a4e3d03rarr˓CreationDateTime=2017-06-05T132839325-0000 ODMVersion=13 xmlnsmdsol=rarr˓httpwwwmdsolcomnsodmmetadata xmlnsxlink=httpwwww3org1999xlinkrarr˓xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=1gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2015-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=2gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2016-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagtltClinicalData StudyOID=Mediflex(Dev) MetaDataVersionOID=999gt
ltSubjectData SubjectKey=3gtltSiteRef LocationOID=1 gtltStudyEventData StudyEventOID=SCREENING StudyEventRepeatKey=1gt
ltFormData FormOID=CHEM FormRepeatKey=1gtltItemGroupData ItemGroupOID=CHEM_LOG_LINEgt
ltItemData ItemOID=CHEMDATECOLL Value=2017-04-25T160900 gtltItemGroupDatagt
ltFormDatagtltStudyEventDatagt
ltSubjectDatagtltClinicalDatagt
ltODMgt
18 Chapter 5 Core Resources
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 6
Using Builders
When communicating with Medidata RAVE Web Services your data payloads will take the form of ODM XML - orOperational Data Model XML documents
Itrsquos important to understand that RWS expects the XML data you send to conform to the ODM format - malformed orotherwise improperly formatted XML wonrsquot be processed Since creating these data structures manually can be timeconsuming and tedious MedidataRWSNET provides several ldquoBuilderrdquo classes to help
61 Basic Example - Register a Subject
By way of example letrsquos say you want to register a subject onto a RAVE study using RWS In order to do this yoursquollneed
1 An authenticated connection to RWS
2 An XML document that represents the POST request you intend to make which will include
bull A Study OID (study)
bull A LocationOID (site)
bull A SubjectKey (subject)
3 A way to deal with the response after the request is sent
The ODMBuilder class allows developers to build out the ODM XML documents required for transmission usinga simple to use fluent interface Using the above example letrsquos create a new ODMBuilder instance to register asubject
var odmObject = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))
After instantiating the ODMBuilder class yoursquoll notice that you have access to chain-able methods which allow youto construct the object appropriate for your use case Since we are registering a subject we supplied a Study OID(Mediflex) Subject Key (SUBJECT001) and Site (SITE01)
19
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
MedidataRWSNET Documentation Release 10
Each of the nested methods used (eg WithClinicalData WithSubjectData andWithTransactionType) map to the specific XML node we want to construct
To see the XML string representation of what wersquove got so far you can use the AsXMLString() method whichwill convert the ODM object you constructed into an XML string
For example
string registrationXml = new ODMBuilder()WithClinicalData(MediFlex cd =gtcdWithSubjectData(SUBJECT001 SITE01 sd =gt
sdWithTransactionType(TransactionTypeInsert)))AsXMLString()
would produce
ltxml version=10 encoding=utf-16gtltODM xmlnsmdsol=httpwwwmdsolcomnsodmmetadata FileType=Transactionalrarr˓Granularity=All FileOID=1d84fb20-1959-45bf-b9c4-cf2ad7a4273d CreationDateTime=rarr˓2017-09-14T1501508441121-0400 AsOfDateTime=0001-01-01T000000 ODMVersion=rarr˓13 xmlns=httpwwwcdiscorgnsodmv13gtltClinicalData StudyOID=MediFlex MetaDataVersionOID=1gt
ltSubjectData SubjectKey=SUBJECT001 TransactionType=InsertgtltSiteRef LocationOID=SITE01 gt
ltSubjectDatagtltAuditRecords gtltSignatures gtltAnnotations gt
ltClinicalDatagtltODMgt
Using this ODM conformant XML you could now POST it to RAVE by wrapping it in a PostDataRequest object
RwsConnection conn = new RwsConnection(innovate username password)var registrationRequest = new PostDataRequest(registrationXml)var response = connSendRequest(registrationRequest) as RWSPostResponse
If successful SUBJECT001 should be registered in SITE01 for the Mediflex study
20 Chapter 6 Using Builders
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21
CHAPTER 7
Indices and tables
bull genindex
bull modindex
bull search
21