============================================
Core Resources
============================================
Clinical Data
=============
Often times you'll want to work with the clinical data of your studies. The Medidata.RWS.NET.Standard library provides
several requests for extracting clinical data (via RAVE "Clinical Views") or POSTing clinical data to the
RAVE platform.
----------------------
ClinicalStudiesRequest
----------------------
Returns a list of EDC studies (as a ``RWSStudies`` object). Excludes studies that you (the authenticated user) are not associated with.
*Example:*
.. code-block:: c#
using Medidata.RWS.NET.Standard.Core.Requests;
//Create a connection
var connection = new RwsConnection("innovate", "username", "password"); // authentication required
//Send the request / get a response
var response = await connection.SendRequestAsync(new ClinicalStudiesRequest()) as RwsStudies;
//Write the study list to the console
foreach (var s in response)
{
Console.Write(s.OID + "\r\n");
}
//Mediflex(Prod)
//Mediflex(Dev)
//PlaceboTest(Prod)
//...
--------------------
StudySubjectsRequest
--------------------
Returns a listing of all the subjects in a study (as a ``RWSSubjects`` object), optionally including those currently inactive or deleted.
Clinical data for the subjects is not included in the response.
This is the equivalent of calling:
``https://{subdomain}.mdsol.com/studies/{study-oid}/Subjects[?status=all&include={inactive|inactiveAndDeleted}]``
Parameters
----------
.. |br| raw:: html
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
| Parameter | Description | Mandatory? |
+=====================================+=============================================================================+=============+
| {study-oid} | The study name. | Yes |
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
| status={**true** | **false**} | If true, add subject level workflow status to |br| | |
| | the response (if present). | No |
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
| include= |br|\ | Will include active, inactive and/or deleted |br| | No |
| {**inactive** | **deleted** | |br|\ | subjects in the response. | |
| **inactiveAndDeleted**} | | |
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
| subjectKeyType= |br|\ | Whether RWS should return the unique |br| | No |
| {**SubjectName** | **SubjectUUID**} | identifier (UUID) or the subject name. | |
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
| links={**true** | **false**} | If true, includes "deep link"(s) (e.g. URLs) to the |br| | No |
| | subject page in Rave in the response. | |
+-------------------------------------+-----------------------------------------------------------------------------+-------------+
*Example:*
.. code-block:: c#
using Medidata.RWS.NET.Standard.Core.Requests;
//Create a connection
var connection = new RwsConnection("innovate", "username", "password"); // authentication required
//Send the request / get a response
var response = await connection.SendRequestAsync(new StudySubjectsRequest("Mediflex", "Prod")) as RwsSubjects;
//Write each subject key to the console
foreach (var s in response)
{
Console.Write(s.SubjectKey + "\r\n");
}
// SUBJECT001
// SUBJECT002
// SUBJECT003
// ...
Clinical View Datasets
======================
In addition to the above requests, Medidata RAVE Web Services allows for the extraction of clinical data in the form of
"Clinical Views" - that is, RAVE database views. There are 3 "Datasets" available that represent different subsets of
clinical data for your studies:
-------------------
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:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/datasets/{ regular|raw }?{options}``
or, to filter the data by form:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/datasets/{ regular|raw }/{ formoid }?{options}``
*Example:*
.. code-block:: c#
//Create a connection
var connection = new RwsConnection("innovate", "username", "password"); // authentication required
//Send the request / get a response
var response = await connection.SendRequestAsync(new StudyDatasetRequest("Mediflex", "Prod", dataset_type: "regular")) as RwsResponse;
//Write the XML response to the console (see XML below)
Console.Write(await response.ResponseObject.Content.ReadAsStringAsync());
.. code-block:: xml
...
---------------------
SubjectDatasetRequest
---------------------
Clinical data in ODM format for the given study / environment for a single subject. Similar to ``StudyDatasetRequest``,
this data can be optionally filtered by a specific Form.
This is the equivalent of calling:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/subjects/{ subjectkey }/datasets/{ regular|raw }?{options}``
or, to filter the data by form:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/subjects/{ subjectkey }/datasets/{ regular|raw }/{ formoid }?{options}``
.. code-block:: c#
using Medidata.RWS.NET.Standard.Core.Requests
using Medidata.RWS.NET.Standard.Core.Requests.Datasets;
//Create a connection
var connection = new RwsConnection("innovate", "username", "password"); // authentication required
//Send the request / get a response
var response = await connection.SendRequestAsync(new SubjectDatasetRequest("Mediflex", "Prod", subject_key: "1", dataset_type: "regular")) as RwsResponse;
//Write the XML response to the console (see XML below)
Console.Write(await response.ResponseObject.Content.ReadAsStringAsync());
.. code-block:: xml
...
...
---------------------
VersionDatasetRequest
---------------------
Clinical data in ODM format for the given study / environment for a single RAVE study version for all subjects.
Similar to ``StudyDatasetRequest``, this data can be optionally filtered by a specific Form.
This is the equivalent of calling:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/versions/{ version_id }/datasets/{ regular|raw }?{options}``
or, to filter the data by form:
``https://{subdomain}.mdsol.com/studies/{project}({environment})/versions/{ version_id }/datasets/{ regular|raw }/{ formoid }?{options}``
.. code-block:: c#
using Medidata.RWS.NET.Standard.Core.Requests
using Medidata.RWS.NET.Standard.Core.Requests.Datasets;
//Create a connection
var connection = new RwsConnection("innovate", "username", "password"); // authentication required
//Send the request / get a response
var response = await connection.SendRequestAsync(new VersionDatasetRequest(project_name: "Mediflex", environment_name: "Dev", version_oid: "999")) as RwsResponse;
//Write the XML response to the console (see XML below)
Console.Write(await response.ResponseObject.Content.ReadAsStringAsync());
*Note the **MetaDataVersionOID** value in the XML response.*
.. code-block:: xml
...