tychat-contracts 1.0.66 → 1.0.68
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.
- package/dist/appointments/appointment.dto.d.ts +13 -0
- package/dist/appointments/appointment.dto.d.ts.map +1 -1
- package/dist/appointments/list-appointments-query.dto.d.ts +2 -0
- package/dist/appointments/list-appointments-query.dto.d.ts.map +1 -1
- package/dist/appointments/list-appointments-query.dto.js +13 -0
- package/dist/patients/index.d.ts +0 -2
- package/dist/patients/index.d.ts.map +1 -1
- package/dist/patients/index.js +0 -2
- package/package.json +1 -1
- package/src/appointments/appointment.dto.ts +17 -0
- package/src/appointments/list-appointments-query.dto.ts +12 -1
- package/src/patients/index.ts +0 -2
- package/src/patients/patient-procedure.dto.ts +0 -64
- package/src/patients/update-patient-procedure.dto.ts +0 -4
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { AppointmentStatusDto } from "./appointment-status.dto";
|
|
2
|
+
/** Procedure as returned nested inside an appointment response. */
|
|
3
|
+
export interface AppointmentProcedureResponseDto {
|
|
4
|
+
id: string;
|
|
5
|
+
appointmentId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
finished: boolean;
|
|
9
|
+
finishedAt: string | null;
|
|
10
|
+
observation: string | null;
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
}
|
|
2
14
|
export interface AppointmentDto {
|
|
3
15
|
id: string;
|
|
4
16
|
patientId: string;
|
|
@@ -10,5 +22,6 @@ export interface AppointmentDto {
|
|
|
10
22
|
observation?: string;
|
|
11
23
|
cancellationReason?: string;
|
|
12
24
|
status: AppointmentStatusDto;
|
|
25
|
+
procedures?: AppointmentProcedureResponseDto[];
|
|
13
26
|
}
|
|
14
27
|
//# sourceMappingURL=appointment.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments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IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,MAAM,EAAE,oBAAoB,CAAC;IAI7B,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppointmentDto } from './appointment.dto';
|
|
2
|
+
import { AppointmentStatusDto } from './appointment-status.dto';
|
|
2
3
|
export declare class ListAppointmentsQueryDto {
|
|
3
4
|
page?: number;
|
|
4
5
|
limit?: number;
|
|
@@ -7,6 +8,7 @@ export declare class ListAppointmentsQueryDto {
|
|
|
7
8
|
userId?: string;
|
|
8
9
|
checkinCompleted?: boolean;
|
|
9
10
|
patientId?: string;
|
|
11
|
+
status?: AppointmentStatusDto;
|
|
10
12
|
}
|
|
11
13
|
export interface AppointmentListResult {
|
|
12
14
|
items: AppointmentDto[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,qBAAa,wBAAwB;IAUnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAQ3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAUnB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ListAppointmentsQueryDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const appointment_status_dto_1 = require("./appointment-status.dto");
|
|
15
16
|
class ListAppointmentsQueryDto {
|
|
16
17
|
page;
|
|
17
18
|
limit;
|
|
@@ -20,6 +21,7 @@ class ListAppointmentsQueryDto {
|
|
|
20
21
|
userId;
|
|
21
22
|
checkinCompleted;
|
|
22
23
|
patientId;
|
|
24
|
+
status;
|
|
23
25
|
}
|
|
24
26
|
exports.ListAppointmentsQueryDto = ListAppointmentsQueryDto;
|
|
25
27
|
__decorate([
|
|
@@ -93,3 +95,14 @@ __decorate([
|
|
|
93
95
|
(0, class_validator_1.IsUUID)('4'),
|
|
94
96
|
__metadata("design:type", String)
|
|
95
97
|
], ListAppointmentsQueryDto.prototype, "patientId", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
100
|
+
description: 'Filtrar por status do agendamento',
|
|
101
|
+
example: 'processing',
|
|
102
|
+
enum: appointment_status_dto_1.APPOINTMENT_STATUSES,
|
|
103
|
+
}),
|
|
104
|
+
(0, class_validator_1.IsOptional)(),
|
|
105
|
+
(0, class_validator_1.IsString)(),
|
|
106
|
+
(0, class_validator_1.IsIn)(appointment_status_dto_1.APPOINTMENT_STATUSES),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], ListAppointmentsQueryDto.prototype, "status", void 0);
|
package/dist/patients/index.d.ts
CHANGED
|
@@ -2,6 +2,4 @@ export * from './create-patient.dto';
|
|
|
2
2
|
export * from './update-patient.dto';
|
|
3
3
|
export * from './patient-history-entry.dto';
|
|
4
4
|
export * from './list-patients-query.dto';
|
|
5
|
-
export * from './patient-procedure.dto';
|
|
6
|
-
export * from './update-patient-procedure.dto';
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patients/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patients/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
package/dist/patients/index.js
CHANGED
|
@@ -18,5 +18,3 @@ __exportStar(require("./create-patient.dto"), exports);
|
|
|
18
18
|
__exportStar(require("./update-patient.dto"), exports);
|
|
19
19
|
__exportStar(require("./patient-history-entry.dto"), exports);
|
|
20
20
|
__exportStar(require("./list-patients-query.dto"), exports);
|
|
21
|
-
__exportStar(require("./patient-procedure.dto"), exports);
|
|
22
|
-
__exportStar(require("./update-patient-procedure.dto"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { AppointmentStatusDto } from "./appointment-status.dto";
|
|
2
2
|
|
|
3
|
+
/** Procedure as returned nested inside an appointment response. */
|
|
4
|
+
export interface AppointmentProcedureResponseDto {
|
|
5
|
+
id: string;
|
|
6
|
+
appointmentId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
value: number;
|
|
9
|
+
finished: boolean;
|
|
10
|
+
finishedAt: string | null;
|
|
11
|
+
observation: string | null;
|
|
12
|
+
createdAt?: string;
|
|
13
|
+
updatedAt?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
3
16
|
export interface AppointmentDto {
|
|
4
17
|
id: string;
|
|
5
18
|
|
|
@@ -48,4 +61,8 @@ export interface AppointmentDto {
|
|
|
48
61
|
* @example 'pending'
|
|
49
62
|
*/
|
|
50
63
|
status: AppointmentStatusDto;
|
|
64
|
+
/*
|
|
65
|
+
* Procedures linked to this appointment (loaded via relation)
|
|
66
|
+
*/
|
|
67
|
+
procedures?: AppointmentProcedureResponseDto[];
|
|
51
68
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
-
import { IsBoolean, IsDateString, IsInt, IsOptional, IsUUID, Max, Min } from 'class-validator';
|
|
2
|
+
import { IsBoolean, IsDateString, IsIn, IsInt, IsOptional, IsString, IsUUID, Max, Min } from 'class-validator';
|
|
3
3
|
import { AppointmentDto } from './appointment.dto';
|
|
4
|
+
import { APPOINTMENT_STATUSES, AppointmentStatusDto } from './appointment-status.dto';
|
|
4
5
|
|
|
5
6
|
export class ListAppointmentsQueryDto {
|
|
6
7
|
@ApiPropertyOptional({
|
|
@@ -66,6 +67,16 @@ export class ListAppointmentsQueryDto {
|
|
|
66
67
|
@IsOptional()
|
|
67
68
|
@IsUUID('4')
|
|
68
69
|
patientId?: string;
|
|
70
|
+
|
|
71
|
+
@ApiPropertyOptional({
|
|
72
|
+
description: 'Filtrar por status do agendamento',
|
|
73
|
+
example: 'processing',
|
|
74
|
+
enum: APPOINTMENT_STATUSES,
|
|
75
|
+
})
|
|
76
|
+
@IsOptional()
|
|
77
|
+
@IsString()
|
|
78
|
+
@IsIn(APPOINTMENT_STATUSES)
|
|
79
|
+
status?: AppointmentStatusDto;
|
|
69
80
|
}
|
|
70
81
|
|
|
71
82
|
export interface AppointmentListResult {
|
package/src/patients/index.ts
CHANGED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
-
import {
|
|
3
|
-
IsBoolean,
|
|
4
|
-
IsDateString,
|
|
5
|
-
IsNotEmpty,
|
|
6
|
-
IsNumber,
|
|
7
|
-
IsOptional,
|
|
8
|
-
IsString,
|
|
9
|
-
IsUUID,
|
|
10
|
-
MaxLength,
|
|
11
|
-
} from 'class-validator';
|
|
12
|
-
|
|
13
|
-
export class PatientProcedureDto {
|
|
14
|
-
@ApiProperty({
|
|
15
|
-
description: 'Nome do procedimento que o paciente irá realizar ou realizou',
|
|
16
|
-
example: 'Consulta clínica',
|
|
17
|
-
maxLength: 255,
|
|
18
|
-
})
|
|
19
|
-
@IsString()
|
|
20
|
-
@IsNotEmpty()
|
|
21
|
-
@MaxLength(255)
|
|
22
|
-
name: string;
|
|
23
|
-
|
|
24
|
-
@ApiProperty({
|
|
25
|
-
description: 'Valor monetário do procedimento',
|
|
26
|
-
example: 150.5,
|
|
27
|
-
})
|
|
28
|
-
@IsNumber({ maxDecimalPlaces: 2 })
|
|
29
|
-
value: number;
|
|
30
|
-
|
|
31
|
-
@ApiProperty({
|
|
32
|
-
description: 'Indica se o procedimento já foi finalizado',
|
|
33
|
-
example: false,
|
|
34
|
-
})
|
|
35
|
-
@IsBoolean()
|
|
36
|
-
finished: boolean;
|
|
37
|
-
|
|
38
|
-
@ApiPropertyOptional({
|
|
39
|
-
description: 'Data e hora em que o procedimento foi finalizado (ISO 8601)',
|
|
40
|
-
example: '2026-03-10T14:30:00.000Z',
|
|
41
|
-
})
|
|
42
|
-
@IsOptional()
|
|
43
|
-
@IsDateString()
|
|
44
|
-
finished_at?: string | null;
|
|
45
|
-
|
|
46
|
-
@ApiPropertyOptional({
|
|
47
|
-
description: 'Observação adicional sobre o procedimento',
|
|
48
|
-
example: 'Paciente chegou em jejum',
|
|
49
|
-
maxLength: 2000,
|
|
50
|
-
})
|
|
51
|
-
@IsString()
|
|
52
|
-
@IsOptional()
|
|
53
|
-
@MaxLength(2000)
|
|
54
|
-
observation?: string | null;
|
|
55
|
-
|
|
56
|
-
@ApiPropertyOptional({
|
|
57
|
-
description: 'ID do agendamento (consulta) ao qual o procedimento está vinculado',
|
|
58
|
-
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
59
|
-
})
|
|
60
|
-
@IsOptional()
|
|
61
|
-
@IsUUID()
|
|
62
|
-
appointmentId?: string | null;
|
|
63
|
-
}
|
|
64
|
-
|