BctNotification

<back to all web services

GetIncompleteResubmittableFormData

OpenClinica
Requires Authentication
The following routes are available for this service:
GET/notification/incomplete-resubmittable-form/
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class IncompleteResubmittableFormData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $studyName=null,
        /** @var string|null */
        public ?string $institutionName=null,
        /** @var string|null */
        public ?string $patientStudyNumber=null,
        /** @var string|null */
        public ?string $eventName=null,
        /** @var string|null */
        public ?string $formName=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['studyName'])) $this->studyName = $o['studyName'];
        if (isset($o['institutionName'])) $this->institutionName = $o['institutionName'];
        if (isset($o['patientStudyNumber'])) $this->patientStudyNumber = $o['patientStudyNumber'];
        if (isset($o['eventName'])) $this->eventName = $o['eventName'];
        if (isset($o['formName'])) $this->formName = $o['formName'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->studyName)) $o['studyName'] = $this->studyName;
        if (isset($this->institutionName)) $o['institutionName'] = $this->institutionName;
        if (isset($this->patientStudyNumber)) $o['patientStudyNumber'] = $this->patientStudyNumber;
        if (isset($this->eventName)) $o['eventName'] = $this->eventName;
        if (isset($this->formName)) $o['formName'] = $this->formName;
        return empty($o) ? new class(){} : $o;
    }
}

class GetIncompleteResubmittableFormDataResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var array<IncompleteResubmittableFormData>|null */
        public ?array $incompleteResubmittableFormData=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['incompleteResubmittableFormData'])) $this->incompleteResubmittableFormData = JsonConverters::fromArray('IncompleteResubmittableFormData', $o['incompleteResubmittableFormData']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->incompleteResubmittableFormData)) $o['incompleteResubmittableFormData'] = JsonConverters::toArray('IncompleteResubmittableFormData', $this->incompleteResubmittableFormData);
        return empty($o) ? new class(){} : $o;
    }
}

// @ApiResponse(Description="Unauthorized.", StatusCode=401)
// @ApiResponse(Description="Forbidden.", StatusCode=403)
// @ApiResponse(Description="Bad Request.", StatusCode=400)
// @ApiResponse(Description="Internal Server Error.", StatusCode=500)
class GetIncompleteResubmittableFormData implements IGet, JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $studyName=null,
        /** @var string|null */
        public ?string $eventName=null,
        /** @var string|null */
        public ?string $formName=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['studyName'])) $this->studyName = $o['studyName'];
        if (isset($o['eventName'])) $this->eventName = $o['eventName'];
        if (isset($o['formName'])) $this->formName = $o['formName'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->studyName)) $o['studyName'] = $this->studyName;
        if (isset($this->eventName)) $o['eventName'] = $this->eventName;
        if (isset($this->formName)) $o['formName'] = $this->formName;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetIncompleteResubmittableFormData DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /notification/incomplete-resubmittable-form/ HTTP/1.1 
Host: notifications.breastcancertrials.org.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	incompleteResubmittableFormData: 
	[
		{
			studyName: String,
			institutionName: String,
			patientStudyNumber: String,
			eventName: String,
			formName: String
		}
	]
}