docta-package 1.2.61 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { Gender } from "../../enums";
|
|
2
2
|
import { IPatientDocument } from "../../models";
|
|
3
|
-
import { UserOutputDto } from "./user";
|
|
4
|
-
|
|
3
|
+
import { UserOutputDto, UserPublicOutputDto } from "./user";
|
|
4
|
+
declare class BasePatientOutputDto {
|
|
5
5
|
id: string;
|
|
6
|
-
user: UserOutputDto;
|
|
7
6
|
dob: number | null;
|
|
8
7
|
phoneNumber: string | null;
|
|
9
8
|
gender: Gender | null;
|
|
9
|
+
constructor(patient: IPatientDocument);
|
|
10
|
+
}
|
|
11
|
+
export declare class PatientOutputDto extends BasePatientOutputDto {
|
|
12
|
+
user: UserOutputDto;
|
|
10
13
|
isDeleted: boolean;
|
|
11
14
|
createdAt: number;
|
|
12
15
|
updatedAt: number;
|
|
13
16
|
constructor(patient: IPatientDocument);
|
|
14
17
|
}
|
|
18
|
+
export declare class PatientPublicOutputDto extends BasePatientOutputDto {
|
|
19
|
+
user: UserPublicOutputDto;
|
|
20
|
+
constructor(patient: IPatientDocument);
|
|
21
|
+
}
|
|
15
22
|
export declare class PatientAdminOutputDto extends PatientOutputDto {
|
|
16
23
|
createdBy: UserOutputDto | null;
|
|
17
24
|
updatedBy: UserOutputDto | null;
|
|
18
25
|
deletedBy: UserOutputDto | null;
|
|
19
26
|
constructor(patient: IPatientDocument);
|
|
20
27
|
}
|
|
28
|
+
export {};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PatientAdminOutputDto = exports.PatientOutputDto = void 0;
|
|
3
|
+
exports.PatientAdminOutputDto = exports.PatientPublicOutputDto = exports.PatientOutputDto = void 0;
|
|
4
4
|
const user_1 = require("./user");
|
|
5
|
-
|
|
6
|
-
class PatientOutputDto {
|
|
5
|
+
class BasePatientOutputDto {
|
|
7
6
|
constructor(patient) {
|
|
8
7
|
var _a, _b;
|
|
9
8
|
this.id = (_b = ((_a = patient.id) !== null && _a !== void 0 ? _a : patient._id)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
10
|
-
this.user = new user_1.UserOutputDto(patient.user);
|
|
11
9
|
this.dob = patient.dob || null;
|
|
12
10
|
this.phoneNumber = patient.phoneNumber || null;
|
|
13
11
|
this.gender = patient.gender || null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Base DTO for everyone
|
|
15
|
+
class PatientOutputDto extends BasePatientOutputDto {
|
|
16
|
+
constructor(patient) {
|
|
17
|
+
super(patient);
|
|
18
|
+
this.user = new user_1.UserOutputDto(patient.user);
|
|
14
19
|
this.isDeleted = patient.isDeleted;
|
|
15
20
|
this.createdAt = patient.createdAt;
|
|
16
21
|
this.updatedAt = patient.updatedAt;
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
exports.PatientOutputDto = PatientOutputDto;
|
|
25
|
+
// Public patient DTO
|
|
26
|
+
class PatientPublicOutputDto extends BasePatientOutputDto {
|
|
27
|
+
constructor(patient) {
|
|
28
|
+
super(patient);
|
|
29
|
+
this.user = new user_1.UserPublicOutputDto(patient.user);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.PatientPublicOutputDto = PatientPublicOutputDto;
|
|
20
33
|
// Extended DTO for admin responses
|
|
21
34
|
class PatientAdminOutputDto extends PatientOutputDto {
|
|
22
35
|
constructor(patient) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ISessionDocument } from "../../models";
|
|
2
2
|
import { PeriodOutputDto } from "./period";
|
|
3
|
-
import { PatientOutputDto } from "./patient";
|
|
4
3
|
import { UserOutputDto } from "./user";
|
|
5
4
|
interface ISessionConfigOutput {
|
|
6
5
|
originalDoctorConsultationFeePerHour: number;
|
|
@@ -12,6 +11,8 @@ export declare class SessionOutputDto {
|
|
|
12
11
|
id: string;
|
|
13
12
|
period: PeriodOutputDto;
|
|
14
13
|
status: string;
|
|
14
|
+
doctorId: string | null;
|
|
15
|
+
patientId: string | null;
|
|
15
16
|
isDeleted: boolean;
|
|
16
17
|
createdAt: number;
|
|
17
18
|
updatedAt: number;
|
|
@@ -25,12 +26,12 @@ export declare class SessionPatientOutputDto extends SessionOutputDto {
|
|
|
25
26
|
constructor(session: ISessionDocument);
|
|
26
27
|
}
|
|
27
28
|
export declare class SessionDoctorOutputDto extends SessionOutputDto {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
pricing: {
|
|
30
|
+
doctorPrice: number;
|
|
31
|
+
};
|
|
30
32
|
constructor(session: ISessionDocument);
|
|
31
33
|
}
|
|
32
34
|
export declare class SessionAdminOutputDto extends SessionOutputDto {
|
|
33
|
-
patient: PatientOutputDto;
|
|
34
35
|
pricing: {
|
|
35
36
|
totalPrice: number;
|
|
36
37
|
doctorPrice: number;
|
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SessionAdminOutputDto = exports.SessionDoctorOutputDto = exports.SessionPatientOutputDto = exports.SessionOutputDto = void 0;
|
|
4
4
|
const period_1 = require("./period");
|
|
5
|
-
const patient_1 = require("./patient");
|
|
6
5
|
const user_1 = require("./user");
|
|
7
6
|
// Base DTO for everyone
|
|
8
7
|
class SessionOutputDto {
|
|
9
8
|
constructor(session) {
|
|
10
|
-
var _a, _b;
|
|
9
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
10
|
this.id = (_b = ((_a = session.id) !== null && _a !== void 0 ? _a : session._id)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
12
11
|
this.period = new period_1.PeriodOutputDto(session.period);
|
|
13
12
|
this.status = session.status;
|
|
13
|
+
this.doctorId =
|
|
14
|
+
((_d = ((_c = session.doctor.id) !== null && _c !== void 0 ? _c : session.doctor._id)) === null || _d === void 0 ? void 0 : _d.toString()) || null;
|
|
15
|
+
this.patientId =
|
|
16
|
+
((_f = ((_e = session.patient.id) !== null && _e !== void 0 ? _e : session.patient._id)) === null || _f === void 0 ? void 0 : _f.toString()) || null;
|
|
14
17
|
this.isDeleted = session.isDeleted;
|
|
15
18
|
this.createdAt = session.createdAt;
|
|
16
19
|
this.updatedAt = session.updatedAt;
|
|
@@ -32,8 +35,9 @@ exports.SessionPatientOutputDto = SessionPatientOutputDto;
|
|
|
32
35
|
class SessionDoctorOutputDto extends SessionOutputDto {
|
|
33
36
|
constructor(session) {
|
|
34
37
|
super(session); // call base constructor
|
|
35
|
-
this.
|
|
36
|
-
|
|
38
|
+
this.pricing = {
|
|
39
|
+
doctorPrice: session.pricing.doctorPrice,
|
|
40
|
+
};
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
|
|
@@ -41,7 +45,6 @@ exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
|
|
|
41
45
|
class SessionAdminOutputDto extends SessionOutputDto {
|
|
42
46
|
constructor(session) {
|
|
43
47
|
super(session); // call base constructor
|
|
44
|
-
this.patient = new patient_1.PatientOutputDto(session.patient);
|
|
45
48
|
this.pricing = {
|
|
46
49
|
totalPrice: session.pricing.totalPrice,
|
|
47
50
|
doctorPrice: session.pricing.doctorPrice,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IUserDocument } from "../../models";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class UserPublicOutputDto {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
email: string;
|
|
6
6
|
role: string;
|
|
7
|
+
constructor(user: IUserDocument);
|
|
8
|
+
}
|
|
9
|
+
export declare class UserOutputDto extends UserPublicOutputDto {
|
|
7
10
|
isActive: boolean;
|
|
8
11
|
timezone: string;
|
|
9
12
|
isDeleted: boolean;
|
package/build/dto/output/user.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoggedInUserOutputDto = exports.UserAdminOutputDto = exports.UserOutputDto = void 0;
|
|
4
|
-
|
|
5
|
-
class UserOutputDto {
|
|
3
|
+
exports.LoggedInUserOutputDto = exports.UserAdminOutputDto = exports.UserOutputDto = exports.UserPublicOutputDto = void 0;
|
|
4
|
+
class UserPublicOutputDto {
|
|
6
5
|
constructor(user) {
|
|
7
6
|
var _a, _b;
|
|
8
7
|
this.id = (_b = ((_a = user.id) !== null && _a !== void 0 ? _a : user._id)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
9
8
|
this.name = user.name;
|
|
10
9
|
this.email = user.email;
|
|
11
10
|
this.role = user.role;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.UserPublicOutputDto = UserPublicOutputDto;
|
|
14
|
+
// Base DTO for everyone
|
|
15
|
+
class UserOutputDto extends UserPublicOutputDto {
|
|
16
|
+
constructor(user) {
|
|
17
|
+
super(user);
|
|
12
18
|
this.isActive = user.isActive;
|
|
13
19
|
this.timezone = user.timezone;
|
|
14
20
|
this.isDeleted = user.isDeleted;
|