@ttn-shared/ui 0.0.1

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.
@@ -0,0 +1,101 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { FC, PropsWithChildren } from 'react';
3
+
4
+ type PatientFormMode = "create" | "edit" | "view";
5
+ interface PatientPayload {
6
+ docTypeId: number;
7
+ document: string;
8
+ firstName: string;
9
+ otherNames: string;
10
+ lastName: string;
11
+ secondSurname: string;
12
+ gender: string;
13
+ birthDate: string;
14
+ homeAddress: string;
15
+ email: string;
16
+ cityId: number;
17
+ homephone: string;
18
+ cellphone: string;
19
+ whatsapp: string;
20
+ bloodType: string;
21
+ maritalStatus: string;
22
+ stratumId: number;
23
+ provinceId: number;
24
+ contracts: PatientContractPayload[];
25
+ affiliationType: number;
26
+ age: string;
27
+ emergencyContact: string;
28
+ neighborhood: string;
29
+ ocupation: string;
30
+ use_contact_lens: string;
31
+ use_glasses: string;
32
+ documentType: number;
33
+ educationLevelId: number;
34
+ ethnicGroupId: number;
35
+ }
36
+ interface PatientContractPayload {
37
+ companyTypeId?: string;
38
+ corporateClientId: number;
39
+ contractId: number;
40
+ populationId: number;
41
+ crtId: number;
42
+ policy: string;
43
+ isMain: 0 | 1;
44
+ }
45
+
46
+ interface PatientFormProps {
47
+ defaultMode: PatientFormMode;
48
+ patientId?: number;
49
+ onSavePatient?: (payload: PatientPayload, mode: PatientFormMode) => void;
50
+ onSaveError?: (error: string) => void;
51
+ onBack?: () => void;
52
+ }
53
+ declare const PatientForm: ({ defaultMode, patientId, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
54
+
55
+ interface Comment {
56
+ id: number;
57
+ userId: number;
58
+ userName: string;
59
+ comment: string;
60
+ date: string;
61
+ }
62
+
63
+ interface PatientNotesProps {
64
+ patientId?: number;
65
+ isOpen: boolean;
66
+ closeOnSave?: boolean;
67
+ onClose: () => void;
68
+ onAttemptRemoveNote?: (comment: Comment) => Promise<boolean>;
69
+ }
70
+ declare const PatientNotes: ({ patientId, isOpen, onClose, closeOnSave, onAttemptRemoveNote, }: PatientNotesProps) => react_jsx_runtime.JSX.Element;
71
+
72
+ interface PatientAssistanceRisksProps {
73
+ patientId?: number;
74
+ isOpen: boolean;
75
+ onClose: () => void;
76
+ }
77
+ declare const PatientAssistanceRisks: ({ patientId, isOpen, onClose, }: PatientAssistanceRisksProps) => react_jsx_runtime.JSX.Element;
78
+
79
+ interface PatientAdministrativeRisksProps {
80
+ patientId?: number;
81
+ isOpen: boolean;
82
+ onClose: () => void;
83
+ }
84
+ declare const PatientAdministrativeRisks: ({ patientId, isOpen, onClose, }: PatientAdministrativeRisksProps) => react_jsx_runtime.JSX.Element;
85
+
86
+ interface PatientAppointmentHistoryProps {
87
+ patientId?: number;
88
+ }
89
+ declare const PatientAppointmentHistory: ({ patientId }: PatientAppointmentHistoryProps) => react_jsx_runtime.JSX.Element;
90
+
91
+ interface TTNSharedProviderProps {
92
+ token: string;
93
+ baseUrl: string;
94
+ userId?: number;
95
+ userName?: string;
96
+ userAccountId?: number;
97
+ }
98
+ declare const TTNSharedProvider: FC<PropsWithChildren<TTNSharedProviderProps>>;
99
+ declare const useTTNSharedContext: () => TTNSharedProviderProps;
100
+
101
+ export { PatientAdministrativeRisks, PatientAppointmentHistory, PatientAssistanceRisks, PatientForm, PatientNotes, TTNSharedProvider, type TTNSharedProviderProps, useTTNSharedContext };
@@ -0,0 +1,101 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { FC, PropsWithChildren } from 'react';
3
+
4
+ type PatientFormMode = "create" | "edit" | "view";
5
+ interface PatientPayload {
6
+ docTypeId: number;
7
+ document: string;
8
+ firstName: string;
9
+ otherNames: string;
10
+ lastName: string;
11
+ secondSurname: string;
12
+ gender: string;
13
+ birthDate: string;
14
+ homeAddress: string;
15
+ email: string;
16
+ cityId: number;
17
+ homephone: string;
18
+ cellphone: string;
19
+ whatsapp: string;
20
+ bloodType: string;
21
+ maritalStatus: string;
22
+ stratumId: number;
23
+ provinceId: number;
24
+ contracts: PatientContractPayload[];
25
+ affiliationType: number;
26
+ age: string;
27
+ emergencyContact: string;
28
+ neighborhood: string;
29
+ ocupation: string;
30
+ use_contact_lens: string;
31
+ use_glasses: string;
32
+ documentType: number;
33
+ educationLevelId: number;
34
+ ethnicGroupId: number;
35
+ }
36
+ interface PatientContractPayload {
37
+ companyTypeId?: string;
38
+ corporateClientId: number;
39
+ contractId: number;
40
+ populationId: number;
41
+ crtId: number;
42
+ policy: string;
43
+ isMain: 0 | 1;
44
+ }
45
+
46
+ interface PatientFormProps {
47
+ defaultMode: PatientFormMode;
48
+ patientId?: number;
49
+ onSavePatient?: (payload: PatientPayload, mode: PatientFormMode) => void;
50
+ onSaveError?: (error: string) => void;
51
+ onBack?: () => void;
52
+ }
53
+ declare const PatientForm: ({ defaultMode, patientId, onSavePatient, onSaveError, onBack, }: PatientFormProps) => react_jsx_runtime.JSX.Element;
54
+
55
+ interface Comment {
56
+ id: number;
57
+ userId: number;
58
+ userName: string;
59
+ comment: string;
60
+ date: string;
61
+ }
62
+
63
+ interface PatientNotesProps {
64
+ patientId?: number;
65
+ isOpen: boolean;
66
+ closeOnSave?: boolean;
67
+ onClose: () => void;
68
+ onAttemptRemoveNote?: (comment: Comment) => Promise<boolean>;
69
+ }
70
+ declare const PatientNotes: ({ patientId, isOpen, onClose, closeOnSave, onAttemptRemoveNote, }: PatientNotesProps) => react_jsx_runtime.JSX.Element;
71
+
72
+ interface PatientAssistanceRisksProps {
73
+ patientId?: number;
74
+ isOpen: boolean;
75
+ onClose: () => void;
76
+ }
77
+ declare const PatientAssistanceRisks: ({ patientId, isOpen, onClose, }: PatientAssistanceRisksProps) => react_jsx_runtime.JSX.Element;
78
+
79
+ interface PatientAdministrativeRisksProps {
80
+ patientId?: number;
81
+ isOpen: boolean;
82
+ onClose: () => void;
83
+ }
84
+ declare const PatientAdministrativeRisks: ({ patientId, isOpen, onClose, }: PatientAdministrativeRisksProps) => react_jsx_runtime.JSX.Element;
85
+
86
+ interface PatientAppointmentHistoryProps {
87
+ patientId?: number;
88
+ }
89
+ declare const PatientAppointmentHistory: ({ patientId }: PatientAppointmentHistoryProps) => react_jsx_runtime.JSX.Element;
90
+
91
+ interface TTNSharedProviderProps {
92
+ token: string;
93
+ baseUrl: string;
94
+ userId?: number;
95
+ userName?: string;
96
+ userAccountId?: number;
97
+ }
98
+ declare const TTNSharedProvider: FC<PropsWithChildren<TTNSharedProviderProps>>;
99
+ declare const useTTNSharedContext: () => TTNSharedProviderProps;
100
+
101
+ export { PatientAdministrativeRisks, PatientAppointmentHistory, PatientAssistanceRisks, PatientForm, PatientNotes, TTNSharedProvider, type TTNSharedProviderProps, useTTNSharedContext };