Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
business-java
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Proteus
business-java
Commits
189e77a5
Commit
189e77a5
authored
Apr 20, 2020
by
CORP\sonam.kamble
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
To store service type and service id
parent
caf00733
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
8 deletions
+94
-8
webitm-dis/src/ibase/webitm/ejb/dis/PatientFamily.java
webitm-dis/src/ibase/webitm/ejb/dis/PatientFamily.java
+94
-8
No files found.
webitm-dis/src/ibase/webitm/ejb/dis/PatientFamily.java
View file @
189e77a5
...
@@ -10,21 +10,15 @@ import java.util.Date;
...
@@ -10,21 +10,15 @@ import java.util.Date;
import
javax.naming.InitialContext
;
import
javax.naming.InitialContext
;
import
org.apache.poi.ss.formula.ptg.MemErrPtg
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
org.json.XML
;
import
org.json.XML
;
import
org.json.simple.JSONArray
;
import
org.json.simple.parser.JSONParser
;
import
ibase.system.config.AppConnectParm
;
import
ibase.system.config.AppConnectParm
;
import
ibase.system.config.ConnDriver
;
import
ibase.system.config.ConnDriver
;
import
ibase.utility.BaseLogger
;
import
ibase.utility.BaseLogger
;
import
ibase.utility.CommonConstants
;
import
ibase.utility.E12GenericUtility
;
import
ibase.utility.E12GenericUtility
;
import
ibase.utility.UserInfoBean
;
import
ibase.utility.UserInfoBean
;
import
ibase.webitm.ejb.MasterStatefulRemote
;
import
ibase.webitm.ejb.MasterStatefulRemote
;
import
ibase.webitm.utility.TransIDGenerator
;
public
class
PatientFamily
public
class
PatientFamily
{
{
...
@@ -42,8 +36,9 @@ public class PatientFamily
...
@@ -42,8 +36,9 @@ public class PatientFamily
district
=
""
,
stanCode
=
""
,
stateCode
=
""
,
pin
=
""
,
birthDate
=
""
,
district
=
""
,
stanCode
=
""
,
stateCode
=
""
,
pin
=
""
,
birthDate
=
""
,
countCode
=
""
,
tel1
=
""
,
tel2
=
""
,
tel3
=
""
,
mobileNo
=
""
,
countCode
=
""
,
tel1
=
""
,
tel2
=
""
,
tel3
=
""
,
mobileNo
=
""
,
status
=
""
,
sex
=
""
,
dob
=
""
,
serviceType
=
""
,
serviceNo
=
""
,
status
=
""
,
sex
=
""
,
dob
=
""
,
serviceType
=
""
,
serviceNo
=
""
,
name
=
""
,
memberName
=
""
,
attachment
=
""
,
gender
=
""
,
errSting
=
""
,
name
=
""
,
memberName
=
""
,
attachment
=
""
,
gender
=
""
,
errSting
=
""
,
idNo
=
""
,
relation
=
""
,
familyMobileNo
=
""
,
birthDateStr
=
""
,
attachmentDbValue
=
""
;
relation
=
""
,
familyMobileNo
=
""
,
birthDateStr
=
""
,
attachmentDbValue
=
""
,
familyServiceType
=
""
,
familyServiceNo
=
""
;
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
E12GenericUtility
genericUtility
=
new
E12GenericUtility
();
E12GenericUtility
genericUtility
=
new
E12GenericUtility
();
Timestamp
birtDateTstmp
=
null
;
Timestamp
birtDateTstmp
=
null
;
...
@@ -127,6 +122,9 @@ public class PatientFamily
...
@@ -127,6 +122,9 @@ public class PatientFamily
attachment
=
data
.
getString
(
"attachment"
);
attachment
=
data
.
getString
(
"attachment"
);
relation
=
data
.
getString
(
"relation"
);
relation
=
data
.
getString
(
"relation"
);
familyMobileNo
=
data
.
getString
(
"mobileNo"
);
familyMobileNo
=
data
.
getString
(
"mobileNo"
);
idNo
=
data
.
getString
(
"idNo"
);
serviceNo
=
data
.
getString
(
"service_no"
);
serviceType
=
data
.
getString
(
"service_type"
);
Date
date
=
new
Date
();
Date
date
=
new
Date
();
long
time
=
date
.
getTime
();
long
time
=
date
.
getTime
();
...
@@ -278,6 +276,10 @@ public class PatientFamily
...
@@ -278,6 +276,10 @@ public class PatientFamily
xmlString
.
append
(
"<relation><![CDATA["
+
relation
+
"]]></relation>"
);
xmlString
.
append
(
"<relation><![CDATA["
+
relation
+
"]]></relation>"
);
xmlString
.
append
(
"<attachment><![CDATA["
+
attachmentDbValue
+
"]]></attachment>"
);
xmlString
.
append
(
"<attachment><![CDATA["
+
attachmentDbValue
+
"]]></attachment>"
);
xmlString
.
append
(
"<mobile_no><![CDATA["
+
familyMobileNo
+
"]]></mobile_no>"
);
xmlString
.
append
(
"<mobile_no><![CDATA["
+
familyMobileNo
+
"]]></mobile_no>"
);
xmlString
.
append
(
"<id_no><![CDATA["
+
idNo
+
"]]></id_no>"
);
xmlString
.
append
(
"<serv_card_no><![CDATA["
+
serviceNo
+
"]]></serv_card_no>"
);
xmlString
.
append
(
"<serv_card_type><![CDATA["
+
serviceType
+
"]]></serv_card_type>"
);
xmlString
.
append
(
"<status><![CDATA["
+
"A"
+
"]]></status>"
);
xmlString
.
append
(
"</Detail2>"
);
xmlString
.
append
(
"</Detail2>"
);
xmlString
.
append
(
"</Root>\r\n"
);
xmlString
.
append
(
"</Root>\r\n"
);
...
@@ -372,4 +374,88 @@ public class PatientFamily
...
@@ -372,4 +374,88 @@ public class PatientFamily
}
}
return
jsonObject
;
return
jsonObject
;
}
}
public
String
updateFamilyStatus
(
String
lineNo
,
UserInfoBean
userInfoBean
)
{
PreparedStatement
pStmt
=
null
;
ResultSet
rs
=
null
;
Connection
conn
=
null
;
ConnDriver
connDriver
=
new
ConnDriver
();
String
sql
=
""
,
errSting
=
""
,
memberName
=
""
;
JSONObject
jsonObject
=
new
JSONObject
();
String
transDB
=
userInfoBean
.
getTransDB
();
String
userCode
=
userInfoBean
.
getLoginCode
();
E12GenericUtility
genericUtility
=
new
E12GenericUtility
();
try
{
conn
=
connDriver
.
getConnectDB
(
transDB
);
sql
=
"SELECT MEMBER_NAME FROM PATIENT_FAMILY WHERE PATIENT_CODE = ?"
+
"AND LINE_NO = ?"
;
pStmt
=
conn
.
prepareStatement
(
sql
);
pStmt
.
setString
(
1
,
userCode
);
pStmt
.
setString
(
2
,
lineNo
);
rs
=
pStmt
.
executeQuery
();
if
(
rs
.
next
())
{
memberName
=
rs
.
getString
(
"MEMBER_NAME"
);
System
.
out
.
println
(
"memberName:"
+
memberName
);
}
//jsonObject.put("member_name", memberName);
if
(
rs
!=
null
)
{
rs
.
close
();
rs
=
null
;
}
if
(
pStmt
!=
null
)
{
pStmt
.
close
();
pStmt
=
null
;
}
sql
=
"UPDATE PATIENT_FAMILY SET STATUS = ? WHERE PATIENT_CODE = ?"
+
" AND LINE_NO = ?"
;
pStmt
=
conn
.
prepareStatement
(
sql
);
pStmt
.
setString
(
1
,
"C"
);
pStmt
.
setString
(
2
,
userCode
);
pStmt
.
setString
(
3
,
lineNo
);
int
i
=
pStmt
.
executeUpdate
();
if
(
i
>
0
)
{
System
.
out
.
println
(
"data updated:"
+
i
);
conn
.
commit
();
errSting
=
genericUtility
.
getErrorString
(
""
,
"VTMEMCLOSE"
,
userCode
);
jsonObject
=
this
.
convertXmlToJsonInError
(
errSting
);
jsonObject
.
put
(
"member_name"
,
memberName
);
System
.
out
.
println
(
"jsonObject"
+
jsonObject
);
}
if
(
pStmt
!=
null
)
{
pStmt
.
close
();
pStmt
=
null
;
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"PatientFamily.updateFamilyStatus()"
+
e
);
}
finally
{
try
{
if
(
pStmt
!=
null
)
{
pStmt
.
close
();
pStmt
=
null
;
}
if
(
conn
!=
null
)
{
conn
.
close
();
conn
=
null
;
}
}
catch
(
Exception
e
)
{
}
}
return
jsonObject
.
toString
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment