Commit 9f273f09 authored by CORP\sonam.kamble's avatar CORP\sonam.kamble

Changes done Koye

parent 55fb8239
......@@ -23,7 +23,7 @@ import ibase.webitm.utility.TransIDGenerator;
public class PatientFamily
{
public String insertPatientFamilyData(String data,UserInfoBean userInfoBean)
public String insertPatientFamilyData(JSONObject data,UserInfoBean userInfoBean)
{
String retstr = "";
MasterStatefulRemote masterStateful = null;
......@@ -34,11 +34,11 @@ public class PatientFamily
int lineNo = 0;
String fName = "", mName = "", lName = "", locCode = "",
addr1 = "", addr2 = "", addr3 = "", city = "",
district = "", stanCode = "", stateCode = "", pin = "",
district = "", stanCode = "", stateCode = "", pin = "",birthDate ="",
countCode = "", tel1 = "", tel2 = "", tel3 = "", mobileNo = "",
status = "", sex = "", dob = "", serviceType = "", serviceNo = "",
name = "",memberName="",attachment="",birthDate="",gender ="",
relation ="",familyMobileNo="",birthDateStr="";
name = "",memberName="",attachment="",gender ="",
relation ="",familyMobileNo="",birthDateStr="",attachmentDbValue = "";
E12GenericUtility genericUtility = new E12GenericUtility();
try {
......@@ -111,19 +111,20 @@ public class PatientFamily
pStmt.close();
pStmt = null;
}
JSONParser parser = new JSONParser();
JSONObject json = (JSONObject) parser.parse(data);
System.out.println("##json object data"+json);
memberName = (String) json.get("name");
gender= (String) json.get("gender");
birthDate = (String) json.get("dateOfBirth");
attachment = (String) json.get("attachment");
relation = (String) json.get("relation");
familyMobileNo = (String) json.get("mobileNo");
birthDateStr = sdfDBFormat.format(sdfAngularFormat.parse(birthDate));
System.out.println("birth date in the db format TESTING:"+birthDateStr);
//JSONParser parser = new JSONParser();
//JSONObject json = (JSONObject) parser.parse(data);
System.out.println("##json object data"+data);
memberName = (String) data.get("name");
gender= (String) data.get("gender");
birthDate = (String) data.get("dateOfBirth");
System.out.println("###birthDate:"+birthDate);
attachment = (String) data.get("attachment");
relation = (String) data.get("relation");
familyMobileNo = (String) data.get("mobileNo");
System.out.println("birth date in the db format TESTING:"+birthDateStr);
AppConnectParm appConnect = new AppConnectParm();
InitialContext ctx = new InitialContext(appConnect.getProperty());
......@@ -204,15 +205,20 @@ public class PatientFamily
*/
xmlString.append("</Detail1>\r\n");
++lineNo;
if(attachment.trim().length() != 0)
{
attachmentDbValue = userId + lineNo;
System.out.println("attachmentDbValue:["+attachmentDbValue);
}
xmlString.append("<Detail2 dbID=\""+userId+lineNo +"\" domID=\"1\" objName=\"patient_family\" objContext=\"2\">");
xmlString.append("<attribute pkNames=\"\" selected=\"Y\" updateFlag=\"A\" status=\"N\" />");
xmlString.append("<patient_code><![CDATA["+userId+"]]></patient_code>");
xmlString.append("<line_no><![CDATA["+ lineNo +"]]></line_no>");
xmlString.append("<member_name><![CDATA["+ memberName +"]]></member_name>");
xmlString.append("<birth_date><![CDATA["+ birthDateStr +"]]></birth_date>");
xmlString.append("<birth_date><![CDATA["+ birthDate +"]]></birth_date>");
xmlString.append("<sex><![CDATA["+ gender +"]]></sex>");
xmlString.append("<relation><![CDATA["+ relation +"]]></relation>");
xmlString.append("<attachment><![CDATA["+ attachment +"]]></attachment>");
xmlString.append("<attachment><![CDATA["+ attachmentDbValue +"]]></attachment>");
xmlString.append("<mobile_no><![CDATA["+ familyMobileNo +"]]></mobile_no>");
xmlString.append("</Detail2>");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment