Get Plans

Gets completed plans accessible to the current user for a given customer ID, ordered by plan and study name. Gets the first 25 complete plans. Using the pagination options, the user can get subsequent pages.

Method: GET

URL: /cleartrial-ws/plans

Table 8-1 Get Plans Query Parameters

Query Parameters Description Accepted Values Examples

fetchDeleted

Filter to include deleted plans or not. Default is true.

true

false

?fetchDeleted=true

?fetchDeleted=false

page

For Pagination. What page of results you are on. Default is 1.

Integer

?page=1

?page=5

dateSinceModified

Filter to list compounds modified after a specific date and time.

DD-MMM-YYYY HH:MM:SS (in 24 hr format)

DD-MMM-YYYY

?dateSinceModified= 14-Mar-2016 14:00:00

Example: /cleartrial-ws/plans?fetchDeleted=false&page=2&dateSinceModified=14-Mar-2016

Sample output in JSON:

{
  "plans": {
    "pageNumber": 1,
    "pageSize": 25,
    "totalPages": 141,
    "isLastPage": false,
    "plan": [
      {
        "id": 65834,
        "name": "Baseline Locked Plan",
        "code": "test",
        "description": "test",
        "createdBy": "administrator, clinical",
        "createdDate": "15-Jun-2016 18:29:57 CDT",
        "lastModifiedBy": "Administrator, QA",
        "lastModifiedDate": "16-Feb-2017 03:11:29 CST",
        "studyId": 27418,
        "planState": "Draft",
        "outsourcingOption": "Combination",
        "startDate": "16-Jun-2016 12:00:00 CDT",
        "preStudyStartDate": "16-Mar-2016 00:00:00 CDT",
        "defaultModelingCurrency": "USD",
        "defaultReportingCurrency": "USD",
        "exchangeRate": 1,
        "drugHandlingType": "Room Temperature",
        "radioLabeledDrug": false,
        "studyDifficulty": "Normal",
        "sourcePlan": {
          "id": 65833,
          "name": "! ! ! ! ! !15.06.16 1 T1 (user-defined template)",
          "url": "/cleartrial-ws/plans/65833"
        },
        "originalTemplate": {
          "id": 1,
          "name": "ClearTrial Default System Template"
        },
        "summaryUrl": "/cleartrial-ws/plans/65834/summary",
        "locationsUrl": "/cleartrial-ws/plans/65834/locations",
        "siteInformationUrl": 
        "/cleartrial-ws/plans/65834/siteInformation",
        "siteApprovalScheduleUrl": 
        "/cleartrial-ws/plans/65834/siteApprovalSchedule",
        "dataUrl": "/cleartrial-ws/plans/65834/data",
        "subjectUrl": "/cleartrial-ws/plans/65834/subject",
        "subjectEnrollmentScheduleUrl": 
        "/cleartrial-ws/plans/65834/subjectEnrollmentSchedule",
        "treatmentUrl": "/cleartrial-ws/plans/65834/treatment",
        "monitoringInformationUrl": 
        "/cleartrial-ws/plans/65834/monitoringInformation",
        "monitoringScheduleUrl": "/cleartrial-ws/plans/65834/monitoringSchedule",
        "serviceProviderUrl": "/cleartrial-ws/plans/65834/serviceProvider",
        "meetingUrl": "/cleartrial-ws/plans/65834/meetings",
        "laborUrl": "/cleartrial-ws/plans/65834/labor",
        "laborMonthlyByMajorTaskUrl": 
        "/cleartrial-ws/plans/65834/labor?view=monthlyByMajorTask",
        "laborMonthlyByResourceUrl": 
        "/cleartrial-ws/plans/65834/labor?view=monthlyByResource",
        "costUrl": "/cleartrial-ws/plans/65834/cost",
        "costMonthlyUrl": "/cleartrial-ws/plans/65834/cost?view=monthly",
        "customAssumptionUrl": "/cleartrial-ws/plans/65834/customAssumption",
        "url": "/cleartrial-ws/plans/65834"
      },
      {
        ...
      },
      ...
    ],
    "url": "/cleartrial-ws/plans"
}

Sub-Resources: None

Note:

In Phase I Healthy Volunteers studies, the Subject Enrollment Schedule sub-resource URL does not appear in the values returned by the Get Plans API.

In the example above:

  • 'pageNumber': 1, specifies that the current contents belong to page 1.

  • 'pageSize': 25, defines the current page size. In this case, the page has 25 plans.

  • 'totalPages': 2, indicates that there are 2 pages available.

  • 'isLastPage': false, indicates that the current page is not the last page.

Continuing with the example, the user can obtain the next page, by issuing the following request:

/cleartrial-ws/plans?page=2

Sample output of the request:

{
    "plans": {
        'pageNumber': 2,
        "pageSize": 25,
        "totalPages": 141,
        "isLastPage": false,
        "plan": [
            {
                "id": 16303,
               ……
               ……

The user does not have to fetch the pages in sequence. The user can specify any page number in the 'pageNumber' field.

If the user asks for a page that does not exist, the ClearTrial application gets the contents of the last page.

For example, if the user asks for page 142, where there are only 141 pages available, with the request:

/cleartrial-ws/plans?page=142

Sample output:

{
    "plans": {
        "pageNumber": 141,
        "pageSize": 25,
        "totalPages": 141,
        "isLastPage": true,
        "plan": [
            {
                "id": 16303,
               ……
               ……

Because the user requested a page number, 142, that fell outside the total number of pages, the application retrieved the last page, 141.

The isLastPage field is set to true to indicate that the current page is the last available page.

The pageSize field is set to 5, indicating that there are only five plans on the last page.