KNH_Project
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
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bestray.healthcareinpatient.util;
import com.bestray.healthcarecommonutil.util.PreferenceUtil;
import com.bestray.healthcarecommonutil.vo.TAccount;
import com.bestray.healthcarecommonutil.vo.TCCodeValues;
import java.util.Date;
import java.util.Vector;
import java.util.prefs.Preferences;
/**
*
* @author User1
*/
public class CollectionUtill {
public static String showCurrentUser(){
TAccount useraccount = new TAccount();
Preferences myPrefObj = Preferences.userRoot();
try{
useraccount = (TAccount)PreferenceUtil.getObject(myPrefObj, "user");
}catch(Exception e){
System.out.println("Exception "+e.getMessage());
}
return useraccount.getFirstName()+" "+ useraccount.getLastName();
}
/**
* Gets the code value index.
*
* @param codeValueList the code value list
* @param codeValueName the code value name
* @return the code value index
*/
public static int getCodeValueIndex(Vector<TCCodeValues> codeValueList,String codeValueName) {
int index = -1;
if (codeValueList != null && codeValueName != null) {
for (int i = 0; i < codeValueList.size(); i++) {
if (codeValueName.equalsIgnoreCase(codeValueList.get(i).getCodeValueName().toString())) {
index = i;
break;
}
}
}
return index;
}
public static int getInpatientDays(Date dt,Date Dt2) {
return (int) ((Dt2.getTime() - dt.getTime()) / (1000 * 60 * 60 * 24));
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Fri 27 Jul, 2018 13:29:42 +0000 |
|