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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.healthcareinpatient.controller;

import com.bestray.healthcarecommonutil.exception.ProcessingException;
import com.bestray.healthcarecommonutil.service.AllergiesMasterService;
import com.bestray.healthcarecommonutil.service.DiagnosisMasterService;
import com.bestray.healthcarecommonutil.service.MedicationMasterService;
import com.bestray.healthcarecommonutil.service.ProcedureMasterService;
import com.bestray.healthcarecommonutil.vo.TAllergiesMaster;
import com.bestray.healthcarecommonutil.vo.TAnesthesiaDetails;
import com.bestray.healthcarecommonutil.vo.TDiagnosisMaster;
import com.bestray.healthcarecommonutil.vo.TEncounterDiagnosis;
import com.bestray.healthcarecommonutil.vo.TEncounterMedication;
import com.bestray.healthcarecommonutil.vo.TEncounterProcedure;
import com.bestray.healthcarecommonutil.vo.TEncounterVitalSign;
import com.bestray.healthcarecommonutil.vo.TMedicationMaster;
import com.bestray.healthcarecommonutil.vo.TPatEncToDo;
import com.bestray.healthcarecommonutil.vo.TPatient;
import com.bestray.healthcarecommonutil.vo.TPatientEncounter;
import com.bestray.healthcarecommonutil.vo.TProcedureMaster;
import com.bestray.healthcareinpatient.service.InpatientRoundingService;
import java.util.List;
import java.util.Vector;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException;
import org.springframework.stereotype.Controller;

/**
 *
 * @author user3
 */
@Controller
public class InPatientRoundingController {
    
    @Autowired
    private AllergiesMasterService allergiesMasterService;
    @Autowired
    private MedicationMasterService medicationMasterService;
    @Autowired
    private ProcedureMasterService procedureMasterService;
    @Autowired
    private DiagnosisMasterService diagnosisMasterService;
    @Autowired
    private InpatientRoundingService inpatientRoundingService;
    
    
    public Vector<TAllergiesMaster> getAllAllergies() throws ProcessingException {
        try{
            Vector allergies = new Vector();
            TAllergiesMaster alrgy ;
            List<TAllergiesMaster> allergyList = allergiesMasterService.getAllergyList();
            for(TAllergiesMaster allergy:allergyList){
                alrgy = new TAllergiesMaster();
                alrgy.setId(allergy.getId());
                alrgy.setAllergiesName(allergy.getAllergiesName());
                allergies.addElement(alrgy);
            }
            return allergies;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public Vector<TMedicationMaster> getAllMedication()throws ProcessingException {
        try{
            Vector<TMedicationMaster> medications = new Vector<TMedicationMaster>();
            List<TMedicationMaster> medicationList = medicationMasterService.getMedicationList();
            for(TMedicationMaster medication:medicationList){
                medications.addElement(medication);
            }
            return medications;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public Vector<TProcedureMaster> getAllProcedure()throws ProcessingException {
        try{
            Vector procedures = new Vector();
            List<TProcedureMaster> procedureList = procedureMasterService.getAllProcedureList();
            for(TProcedureMaster procedure:procedureList){
                TProcedureMaster tempprocedure = new TProcedureMaster();
                tempprocedure.setId(procedure.getId());
                tempprocedure.setProcedureName(procedure.getProcedureName());
                procedures.addElement(tempprocedure);
            }
            return procedures;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public Vector<TDiagnosisMaster> getAllDiagnosis()throws ProcessingException {
        try{
            Vector<TDiagnosisMaster> diagnosis = new Vector<TDiagnosisMaster>();
            List<TDiagnosisMaster> diagnosisList = diagnosisMasterService.getDiagnosisList();
            for(TDiagnosisMaster diagnos:diagnosisList){
                diagnosis.addElement(diagnos);
            }
            return diagnosis;
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TPatientEncounter getIPEncounterByPatient(TPatient pat)throws ProcessingException {
        try{
           return inpatientRoundingService.getIPEncounterByPatient(pat);
        }catch(ProcessingException e){
            throw e;
        }
    }

    /*public TPatientEncounter createIPEncounter(TPatientEncounter enc)throws ProcessingException,HibernateOptimisticLockingFailureException{
        try{
            return inpatientRoundingService.createIPEncounter(enc);
        }catch(  HibernateOptimisticLockingFailureException | ProcessingException e){
            throw e;
        }
    }*/
    
    public TMedicationMaster getMedication(String name)throws ProcessingException{
        try{
            return medicationMasterService.getMedication(name);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TEncounterMedication saveMedication(TEncounterMedication encounterMedication)throws ProcessingException,HibernateOptimisticLockingFailureException {
        try{
             return inpatientRoundingService.saveMedication(encounterMedication);
        }catch(  HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }

    public void saveMedicationMaster(TMedicationMaster medication) throws ProcessingException,HibernateOptimisticLockingFailureException{
        try{
            medicationMasterService.saveMedicationMaster(medication);
        }catch(  HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }

    public List<TEncounterMedication> getEncounterMedication(TPatientEncounter encounter,int status) throws ProcessingException {
        try{
            return inpatientRoundingService.getEncounterMedication(encounter,status);
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public List<TEncounterMedication> getEncounterMedicationByEncIdnType(TPatientEncounter encounter,String type) throws ProcessingException{
        try{
            return inpatientRoundingService.getEncounterMedicationByEncIdnType(encounter,type);
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public List<TEncounterVitalSign> getEncounterVitalsignByEncIdnType(TPatientEncounter encounter,String type) throws ProcessingException{
      try{
            return inpatientRoundingService.getEncounterVitalsignByEncIdnType(encounter,type);
        }catch(ProcessingException e){
            throw e;
        } 
    }
  public List<TEncounterProcedure>  getEncounterProcedureByEncIdnType(TPatientEncounter encounter,String type) throws ProcessingException{
      try{
            return inpatientRoundingService.getEncounterProcedureByEncIdnType(encounter,type);
        }catch(ProcessingException e){
            throw e;
        }
  }

    public TEncounterMedication getEncounterMedicationById(Long encmedid) throws ProcessingException{
        try{
            return inpatientRoundingService.getEncounterMedicationById(encmedid);
        }catch(ProcessingException e){
            e.printStackTrace();
            throw e;
        }
    }

    public TEncounterMedication reorderMedication(TEncounterMedication encmed) throws ProcessingException {
        try{
            return inpatientRoundingService.reorderMedication(encmed);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TPatientEncounter getEncounterById(Long encid)throws ProcessingException  {
        try{
            return inpatientRoundingService.getEncounterById(encid);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TProcedureMaster getProcedure(String procname)throws ProcessingException {
        try{
            return procedureMasterService.getProcedureByName(procname);
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public TProcedureMaster getProcedureById(Long id)throws ProcessingException {
        try{
            return procedureMasterService.getProcedureValues(id);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public void saveProcedureMaster(TProcedureMaster procedure)throws ProcessingException{
        /*try{
            procedureMasterService.saveProcedureMaster(procedure);
        }catch(ProcessingException e){
            throw e;
        }*/
    }

    public TEncounterProcedure saveProcedure(TEncounterProcedure encounterProcedure)throws ProcessingException,HibernateOptimisticLockingFailureException {
        try{
             return inpatientRoundingService.saveProcedure(encounterProcedure);
        }catch(  HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }

    public List<TEncounterProcedure> getEncounterProcedure(TPatientEncounter encounter)throws ProcessingException {
        try{
            return inpatientRoundingService.getEncounterProcedure(encounter);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TEncounterProcedure getEncProcedure(Long encprocid)throws ProcessingException {
        try{
            return inpatientRoundingService.getEncProcedure(encprocid);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public void deleteEncProc(TEncounterProcedure encproc)throws ProcessingException {
        try{
            inpatientRoundingService.deleteEncProc(encproc);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TPatientEncounter saveIPEncounter(boolean b,TPatientEncounter inpatenc)throws ProcessingException {
        try{
            return inpatientRoundingService.saveIPEncounter(b,inpatenc);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TPatEncToDo saveToDo(TPatEncToDo encounterToDo) throws ProcessingException{
        try{
             return inpatientRoundingService.saveToDo(encounterToDo);
        }catch(HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }
    //Prasanta. To save vital sign
     public void saveVitalSign(TEncounterVitalSign encounterVitalSign) throws ProcessingException{
        try{
              inpatientRoundingService.saveVitalSign(encounterVitalSign);
        }catch(HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }
     public void saveAnesthesiaDetails(TAnesthesiaDetails anesthesiaDetails) throws ProcessingException{
        try{
              inpatientRoundingService.saveAnesthesiaDetails(anesthesiaDetails);
        }catch(HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }
     
     public List<TEncounterVitalSign> getAllVitalSignsForPatient(TPatientEncounter encounter) throws ProcessingException{
         
        try{
            return inpatientRoundingService.getAllVitalSignsForPatient(encounter);
        }catch(ProcessingException e){
            throw e;
        }
    }
     
     
    public TEncounterVitalSign  getVitalsignDetailById(long id)throws ProcessingException {
        try{
            return inpatientRoundingService.getVitalsignDetailById(id);
        }
        catch(ProcessingException e){
            e.printStackTrace();
            throw e;
        }
    }
     public List<TAnesthesiaDetails> getAllAnesthesiaDetailsForPatient(TPatientEncounter encounter) throws ProcessingException{
         
        try{
            return inpatientRoundingService.getAllAnesthesiaDetailsForPatient(encounter);
        }catch(ProcessingException e){
            throw e;
        }
    }
     public TAnesthesiaDetails  getAnesthesiaDetailById(long id)throws ProcessingException {
        try{
            return inpatientRoundingService.getAnesthesiaDetailById(id);
        }
        catch(ProcessingException e){
            e.printStackTrace();
            throw e;
        }
    }

    public List<TPatEncToDo> getTasksForEncounter(TPatientEncounter encounter)throws ProcessingException {
        try{
            return inpatientRoundingService.getTasksForEncounter(encounter);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TPatEncToDo getEncTask(Long enctaskid) throws ProcessingException{
        try{
            return inpatientRoundingService.getEncTask(enctaskid);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public void deleteEncTask(TPatEncToDo enctodo)throws ProcessingException {
        try{
            inpatientRoundingService.deleteEncTask(enctodo);
        }catch(ProcessingException e){
            throw e;
        }
    }
    public void deleteAnesthesiaDetails(TAnesthesiaDetails anesthesiaDetails) throws ProcessingException{
     try{
            inpatientRoundingService.deleteAnesthesiaDetails(anesthesiaDetails);
        }catch(ProcessingException e){
            throw e;
        }   
    }
    
     public void deleteEncounterMedication(TEncounterMedication encmed) throws ProcessingException{
     try{
            inpatientRoundingService.deleteEncounterMedication(encmed);
        }catch(ProcessingException e){
            throw e;
        }   
    }
     public void deleteEncounterProcedure(TEncounterProcedure encProc)throws ProcessingException{
         try{
            inpatientRoundingService.deleteEncounterProcedure(encProc);
        }catch(ProcessingException e){
            throw e;
        }  
     }
     
    public void  deleteEncounterVitalSign(TEncounterVitalSign encVitalSign)throws ProcessingException{
        try{
            inpatientRoundingService.deleteEncounterVitalSign(encVitalSign);
        }catch(ProcessingException e){
            throw e;
        }  
    }
    public Vector<TDiagnosisMaster> getDiagnosis(String expr)throws ProcessingException {
        try{
            Vector<TDiagnosisMaster> diagnosis = new Vector<TDiagnosisMaster>();
            List<TDiagnosisMaster> diagnosisList = inpatientRoundingService.getDiagnosis(expr);
            for(TDiagnosisMaster diagnos:diagnosisList){
                diagnosis.addElement(diagnos);
            }
            return diagnosis;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public TDiagnosisMaster getDiagnosisValues(Integer diagnosisId)throws ProcessingException {
        try{
            return diagnosisMasterService.getDiagnosisValues(diagnosisId);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public TEncounterDiagnosis saveDiagnosis(TEncounterDiagnosis encounterDiagnosis)throws ProcessingException {
        try{
             return inpatientRoundingService.saveDiagnosis(encounterDiagnosis);
        }catch(  HibernateOptimisticLockingFailureException | ProcessingException ex){
            throw ex;
        }
    }

    public List<TEncounterDiagnosis> getEncounterDiagnosis(TPatientEncounter encounter)throws ProcessingException {
        try{
            return inpatientRoundingService.getEncounterDiagnosis(encounter);
        }catch(ProcessingException e){
            throw e;
        }
    }

    public void deleteEncDiag(TEncounterDiagnosis ediag)throws ProcessingException {
        try{
            inpatientRoundingService.deleteEncDiag(ediag);
        }catch(ProcessingException e){
            throw e;
        }
    }

   public Vector<TProcedureMaster> getProcedureByName(String expr)throws ProcessingException {
        try{
            Vector<TProcedureMaster> procedures = new Vector<TProcedureMaster>();
            List<TProcedureMaster> procedureList = procedureMasterService.getProcedureListBySearch(expr);
            for(TProcedureMaster proc:procedureList){
                procedures.addElement(proc);
            }
            return procedures;
        }catch(ProcessingException e){
            throw e;
        }
    }
}

Commits for Satyam/AuroCareHealthCareInPatient/src/main/java/com/bestray/healthcareinpatient/controller/InPatientRoundingController.java

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