@upv/ushi-shared
Version:
Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).
53 lines (52 loc) • 1.58 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const BaseDto_1 = __importDefault(require("../base/BaseDto"));
/**
* TrialParticipantProfileDto
*
* DTO for representing a user's enrollment and status within a clinical trial.
*/
class TrialParticipantProfileDto extends BaseDto_1.default {
constructor(data) {
super(data);
this._userId = data.userId;
this._trialId = data.trialId;
this._participantCode = data.participantCode;
this._enrollmentStatus = data.enrollmentStatus;
this._consentedAt = data.consentedAt;
this._siteId = data.siteId;
}
async serialize() {
return {
...(await this.serializeBase()),
userId: this._userId,
trialId: this._trialId,
participantCode: this._participantCode ?? null,
enrollmentStatus: this._enrollmentStatus,
consentedAt: this._consentedAt ?? null,
siteId: this._siteId ?? null,
};
}
get userId() {
return this._userId;
}
get trialId() {
return this._trialId;
}
get participantCode() {
return this._participantCode;
}
get enrollmentStatus() {
return this._enrollmentStatus;
}
get consentedAt() {
return this._consentedAt;
}
get siteId() {
return this._siteId;
}
}
exports.default = TrialParticipantProfileDto;