Subversion Repository Public Repository

Satyam

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.healthcarecommonutil.vo;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.Version;

// TODO: Auto-generated Javadoc
/**
 * The Class TAppointment.
 *
 * @author sumitHome
 */

@NamedQueries({
	@NamedQuery(
	name = "findAllAppointmentList",
	query = "from TAppointment where appointmentDate = ? and doctorNameId = ? and appointmentStatus = 1 and patientStatus != 3 "
        ),
        @NamedQuery(
	name = "findAppointmentListByPatient",
	query = "from TAppointment where patientNameId = ? and appointmentStatus = 1 "
	),
        @NamedQuery(
	name = "findAppointmentListByDate",
	query = "from TAppointment where appointmentDate = ? and appointmentStatus = 1 order by patientOpdNumber asc "
	),
        @NamedQuery(
	name = "findPreviousAppointments",
	query = "from TAppointment where patientNameId = ? and appointmentDate = ? and departmentNameId = ? and doctorNameId = ? and visitType = ? and appointmentStatus = 1 and patientStatus in(1,2) "
	),
        @NamedQuery(
	name = "findAppointmentListByDepartment",
	query = "from TAppointment where appointmentDate = ? and departmentNameId = ? and appointmentStatus = 1 order by patientOpdNumber asc "
	),
        @NamedQuery(
	name = "findAppointmentListByDoctor",
	query = "from TAppointment where appointmentDate = ? and departmentNameId = ? and doctorNameId = ? and appointmentStatus = 1 order by patientOpdNumber asc "
	),
        @NamedQuery(
	name = "findVisitOccuranceByPatient",
	query = "from TAppointment where patientNameId = ? and appointmentStatus = 1 and patientStatus = 0 "
	),
        @NamedQuery(
	name = "getAppointmentList",
	query = "from TAppointment where appointmentDate = ? OR (monthname(appointmentDate)= ? AND year(appointmentDate)= ?) OR year(appointmentDate)= ? ORDER BY appointmentDate,patientOpdNumber "
        ),
        @NamedQuery(
	name = "getAppointmentListByDeptWise",
	query = "from TAppointment where (appointmentDate = ? OR (monthname(appointmentDate)= ? AND year(appointmentDate)= ?) OR year(appointmentDate)= ?) AND departmentNameId = ? ORDER BY appointmentDate,patientOpdNumber "
        )        
})

@Entity
@Table(name="t_doctor_appointment")
public class TAppointment implements java.io.Serializable {
    
    /** The id. */
    @Id
    //@GeneratedValue
    @GeneratedValue(strategy = GenerationType.IDENTITY)
     private Long id;
    
    /** The appointment date. */
    @Temporal(javax.persistence.TemporalType.DATE)
    @Column(name="appointment_date")
     private Date appointmentDate;
    
    /** The doctor name id. */
    @ManyToOne
    @JoinColumn(name="doctor_name_id")
    private TDoctorInformation doctorNameId;
    
    /** The patient name id. */
    @ManyToOne
    @JoinColumn(name="patient_name_id")
     private TPatient patientNameId;
    
    /** The department name id. */
    @ManyToOne
    @JoinColumn(name="department_name_id")
     private TDepartmentMaster departmentNameId;
    
    /** The appointment time. */
    @Column(name="appointment_time")
     private String appointmentTime;
             
    /** The visit type. */
    @Column(name="visit_type")
     private String visitType;
    
    /** The visit interval. */
    @Column(name="visit_interval")
     private Integer visitInterval;
    
    /** The appointment status. */
    @Column(name="appointment_status")
     private int appointmentStatus;
    
    /** The patient status. */
    @Column(name="patient_status")
     private int patientStatus;
    
    /** The patient checkin time. */
    @Temporal(javax.persistence.TemporalType.TIME)
    @Column(name="patient_checkin_time")
     private Date patientCheckinTime;
    
    /** The patient checkout time. */
    @Temporal(javax.persistence.TemporalType.TIME)
    @Column(name="patient_checkout_time")
     private Date patientCheckoutTime;
    
    /** The patient opd number. */
    @Column(name="patient_opd_number")
     private Integer patientOpdNumber;
    
    
    /** The appointment notes. */
    @Column(name="appointment_notes")
     private String appointmentNotes;
            
    /** The created by. */
    @Column(name="created_by")
     private String createdBy;
    
    /** The created date. */
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    @Column(name="created_date")
     private Date createdDate;
    
    /** The updated date. */
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    @Column(name="updated_date")
     private Date updatedDate;
    
    /** The record version. */
    @Version
    @Column(name = "record_version")
    private Long recordVersion;  
    
    /** The visit number. */
    @Column(name="visit_number")
     private Integer visitNumber;
    
    /** The paid amount. */
    @Column(name="paid_amount")
     private Double paidAmount;
    
    /** The free patient. */
    @Column(name="free_patient")
     private String free_patient;
    
    /** The schedule type. */
    @Column(name="schedule_type")
     private String scheduleType;
    
    /**
     * Gets the id.
     *
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * Sets the id.
     *
     * @param id the new id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Gets the appointment date.
     *
     * @return the appointment date
     */
    public Date getAppointmentDate() {
        return appointmentDate;
    }

    /**
     * Sets the appointment date.
     *
     * @param appointmentDate the new appointment date
     */
    public void setAppointmentDate(Date appointmentDate) {
        this.appointmentDate = appointmentDate;
    }

    /**
     * Gets the doctor name id.
     *
     * @return the doctor name id
     */
    public TDoctorInformation getDoctorNameId() {
        return doctorNameId;
    }

    /**
     * Sets the doctor name id.
     *
     * @param doctorNameId the new doctor name id
     */
    public void setDoctorNameId(TDoctorInformation doctorNameId) {
        this.doctorNameId = doctorNameId;
    }

    /**
     * Gets the patient name id.
     *
     * @return the patient name id
     */
    public TPatient getPatientNameId() {
        return patientNameId;
    }

    /**
     * Sets the patient name id.
     *
     * @param patientNameId the new patient name id
     */
    public void setPatientNameId(TPatient patientNameId) {
        this.patientNameId = patientNameId;
    }

    /**
     * Gets the department name id.
     *
     * @return the department name id
     */
    public TDepartmentMaster getDepartmentNameId() {
        return departmentNameId;
    }

    /**
     * Sets the department name id.
     *
     * @param departmentNameId the new department name id
     */
    public void setDepartmentNameId(TDepartmentMaster departmentNameId) {
        this.departmentNameId = departmentNameId;
    }

    /**
     * Gets the appointment time.
     *
     * @return the appointment time
     */
    public String getAppointmentTime() {
        return appointmentTime;
    }

    /**
     * Sets the appointment time.
     *
     * @param appointmentTime the new appointment time
     */
    public void setAppointmentTime(String appointmentTime) {
        this.appointmentTime = appointmentTime;
    }

    /**
     * Gets the visit type.
     *
     * @return the visit type
     */
    public String getVisitType() {
        return visitType;
    }

    /**
     * Sets the visit type.
     *
     * @param visitType the new visit type
     */
    public void setVisitType(String visitType) {
        this.visitType = visitType;
    }

    /**
     * Gets the visit interval.
     *
     * @return the visit interval
     */
    public Integer getVisitInterval() {
        return visitInterval;
    }

    /**
     * Sets the visit interval.
     *
     * @param visitInterval the new visit interval
     */
    public void setVisitInterval(Integer visitInterval) {
        this.visitInterval = visitInterval;
    }

    
    
    /**
     * Gets the appointment status.
     *
     * @return the appointment status
     */
    public int getAppointmentStatus() {
        return appointmentStatus;
    }

    /**
     * Sets the appointment status.
     *
     * @param appointmentStatus the new appointment status
     */
    public void setAppointmentStatus(int appointmentStatus) {
        this.appointmentStatus = appointmentStatus;
    }

    /**
     * Gets the patient status.
     *
     * @return the patient status
     */
    public int getPatientStatus() {
        return patientStatus;
    }

    /**
     * Sets the patient status.
     *
     * @param patientStatus the new patient status
     */
    public void setPatientStatus(int patientStatus) {
        this.patientStatus = patientStatus;
    }

    /**
     * Gets the patient checkin time.
     *
     * @return the patient checkin time
     */
    public Date getPatientCheckinTime() {
        return patientCheckinTime;
    }

    /**
     * Sets the patient checkin time.
     *
     * @param patientCheckinTime the new patient checkin time
     */
    public void setPatientCheckinTime(Date patientCheckinTime) {
        this.patientCheckinTime = patientCheckinTime;
    }

    /**
     * Gets the patient checkout time.
     *
     * @return the patient checkout time
     */
    public Date getPatientCheckoutTime() {
        return patientCheckoutTime;
    }

    /**
     * Sets the patient checkout time.
     *
     * @param patientCheckoutTime the new patient checkout time
     */
    public void setPatientCheckoutTime(Date patientCheckoutTime) {
        this.patientCheckoutTime = patientCheckoutTime;
    }

    /**
     * Gets the patient opd number.
     *
     * @return the patient opd number
     */
    public Integer getPatientOpdNumber() {
        return patientOpdNumber;
    }

    /**
     * Sets the patient opd number.
     *
     * @param patientOpdNumber the new patient opd number
     */
    public void setPatientOpdNumber(Integer patientOpdNumber) {
        this.patientOpdNumber = patientOpdNumber;
    }

    /**
     * Gets the appointment notes.
     *
     * @return the appointment notes
     */
    public String getAppointmentNotes() {
        return appointmentNotes;
    }

    /**
     * Sets the appointment notes.
     *
     * @param appointmentNotes the new appointment notes
     */
    public void setAppointmentNotes(String appointmentNotes) {
        this.appointmentNotes = appointmentNotes;
    }

    /**
     * Gets the created by.
     *
     * @return the created by
     */
    public String getCreatedBy() {
        return createdBy;
    }

    /**
     * Sets the created by.
     *
     * @param createdBy the new created by
     */
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    /**
     * Gets the created date.
     *
     * @return the created date
     */
    public Date getCreatedDate() {
        return createdDate;
    }

    /**
     * Sets the created date.
     *
     * @param createdDate the new created date
     */
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    /**
     * Gets the updated date.
     *
     * @return the updated date
     */
    public Date getUpdatedDate() {
        return updatedDate;
    }

    /**
     * Sets the updated date.
     *
     * @param updatedDate the new updated date
     */
    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    /**
     * Gets the record version.
     *
     * @return the record version
     */
    public Long getRecordVersion() {
        return recordVersion;
    }

    /**
     * Sets the record version.
     *
     * @param recordVersion the new record version
     */
    public void setRecordVersion(Long recordVersion) {
        this.recordVersion = recordVersion;
    }

    /**
     * Gets the visit number.
     *
     * @return the visit number
     */
    public Integer getVisitNumber() {
        return visitNumber;
    }

    /**
     * Sets the visit number.
     *
     * @param visitNumber the new visit number
     */
    public void setVisitNumber(Integer visitNumber) {
        this.visitNumber = visitNumber;
    }

    public Double getPaidAmount() {
        return paidAmount;
    }

    public void setPaidAmount(Double paidAmount) {
        this.paidAmount = paidAmount;
    }

    public String getFree_patient() {
        return free_patient;
    }

    public void setFree_patient(String free_patient) {
        this.free_patient = free_patient;
    }

    public String getScheduleType() {
        return scheduleType;
    }

    public void setScheduleType(String scheduleType) {
        this.scheduleType = scheduleType;
    }
    
    
    
    /**
     * Clone appointment.
     *
     * @param appointment the appointment
     * @return the t appointment
     */
    public TAppointment cloneAppointment(TAppointment appointment){
            
        TAppointment appoint = new TAppointment();
        appoint.setDoctorNameId(appointment.getDoctorNameId());
        appoint.setPatientNameId(appointment.getPatientNameId());
        appoint.setDepartmentNameId(appointment.getDepartmentNameId());
        appoint.setAppointmentTime(appointment.getAppointmentTime());
        appoint.setVisitType(appointment.getVisitType());
        return appoint;
        
        
    }
    
    /**
     * Clone appointment by time.
     *
     * @param appointment the appointment
     * @return the t appointment
     */
    public TAppointment cloneAppointmentByTime(TAppointment appointment){
            
        TAppointment appoint = new TAppointment();
        appoint.setAppointmentDate(appointment.getAppointmentDate());
        appoint.setDoctorNameId(appointment.getDoctorNameId());
        appoint.setPatientNameId(appointment.getPatientNameId());
        appoint.setDepartmentNameId(appointment.getDepartmentNameId());
        appoint.setAppointmentTime(appointment.getAppointmentTime());
        appoint.setVisitType(appointment.getVisitType());
        appoint.setAppointmentStatus(appointment.getAppointmentStatus());
        appoint.setPatientStatus(appointment.getPatientStatus());
        appoint.setFree_patient(appointment.getFree_patient());
        appoint.setPaidAmount(appointment.getPaidAmount());
        return appoint;
        
        
    }
}

Commits for Satyam/AuroCareCommonUtil/src/main/java/com/bestray/healthcarecommonutil/vo/TAppointment.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Fri 20 Jul, 2018 05:59:17 +0000