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

import com.bestray.healthcarecommonutil.exception.ProcessingException;
import com.bestray.healthcarecommonutil.service.ComponentMasterService;
import com.bestray.healthcarecommonutil.service.ProcedureMasterService;
import com.bestray.healthcarecommonutil.vo.TComponentMaster;
import com.bestray.healthcarecommonutil.vo.TProcedureMaster;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 *
 * @author User1
 */
@Controller
public class OrderChoiceController {
    
    @Autowired
    private ProcedureMasterService procedureMasterService;
    
    @Autowired
    private ComponentMasterService componentMasterService;

    /*public OrderChoiceController(ProcedureMasterService procedureMasterService, ComponentMasterService componentMasterService) {
        this.procedureMasterService = procedureMasterService;
        this.componentMasterService = componentMasterService;
    }*/
    
    /**
     * Gets the procedure list by name.
     *
     * @param procedureName the procedure name
     * @return the procedure list by name
     * @throws ProcessingException the processing exception
     */
    public Vector<TProcedureMaster> getProcedureListBySearch(String expr) throws ProcessingException{
        try{
            Vector<TProcedureMaster> procedures = new Vector<TProcedureMaster>();
            List<TProcedureMaster> procedureList=new ArrayList<TProcedureMaster>();
            procedureList = procedureMasterService.getProcedureListBySearch(expr);
            for(TProcedureMaster procedure:procedureList){
                procedures.addElement(procedure);
            }
            return procedures;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    public Vector<TComponentMaster> getComponetListBySearch(String expr) throws ProcessingException{
        try{
            Vector<TComponentMaster> components = new Vector<TComponentMaster>();
            List<TComponentMaster> componentList=new ArrayList<TComponentMaster>();
            componentList = componentMasterService.getComponetListBySearch(expr);
            for(TComponentMaster component:componentList){
                components.addElement(component);
            }
            return components;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    /**
     * Gets the procedure values.
     *
     * @param procedureId the procedure id
     * @return the procedure values
     * @throws ProcessingException the processing exception
     */
    public TProcedureMaster getProcedureValues(Long procedureId)throws ProcessingException {
        try{
            return procedureMasterService.getProcedureValues(procedureId);
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    /**
     * Gets the all procedure.
     *
     * @return the all procedure
     * @throws ProcessingException the processing exception
     */
    public Vector<TProcedureMaster> getAllProcedure()throws ProcessingException {
        try{
            //Vector procedures = new Vector();
            Vector<TProcedureMaster> procedures = new Vector<TProcedureMaster>();
            List<TProcedureMaster> procedureList = procedureMasterService.getAllProcedureList();
            for(TProcedureMaster procedure:procedureList){
                /*TProcedureMaster tempprocedure = new TProcedureMaster();
                tempprocedure.setId(procedure.getId());
                tempprocedure.setProcedureName(procedure.getProcedureName());*/
                procedures.addElement(procedure);
            }
            return procedures;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
    /**
     * Find component List.
     *
     * @return the component list
     * @throws ProcessingException the processing exception
     */
    public Vector<TComponentMaster> getAllComponentList() throws ProcessingException{
        try{
            Vector<TComponentMaster> components = new Vector<TComponentMaster>();
            List<TComponentMaster> componentList=new ArrayList<TComponentMaster>();
            componentList = componentMasterService.getAllComponentList();
            for(TComponentMaster component:componentList){
                components.addElement(component);
            }
            return components;
        }catch(ProcessingException e){
            throw e;
        }
    }
    
}

Commits for Satyam/AuroCareLabInformationSystem/src/main/java/com/bestray/labinformationsystem/controller/OrderChoiceController.java

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