package com.dbs.mplus.knuh.httpTask; import com.dbs.mplus.knuh.model.CategoryVO; import com.dbs.mplus.knuh.model.ConsentFormListVO; import com.dbs.mplus.knuh.model.ConsentImageVO; import com.dbs.mplus.knuh.model.DeptListVO; import com.dbs.mplus.knuh.model.DoctorListVO; import com.dbs.mplus.knuh.model.PatientInfoVO; import com.dbs.mplus.knuh.model.PatientListVO; import com.dbs.mplus.knuh.model.UserLoginDeptList; import com.dbs.mplus.knuh.model.UserSignDataInfoVO; import com.dbs.mplus.knuh.util.ConsentConfig; import org.ksoap2.serialization.SoapObject; import java.util.ArrayList; public class SoapParser { private static final String TAG = "SoapParser"; public static ArrayList userLoginDeptList(SoapObject object) { ArrayList arrayList = new ArrayList<>(); int total = 0; if (object != null) { total = object.getPropertyCount(); if (total == 1) { if (object.getProperty(0) == null) { total = 0; } } } if (total == 0) { } else { for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String dutplceInstCd = so.getProperty("dutplceInstCd").toString().trim(); String dutplceInstNm = so.getProperty("dutplceInstNm").toString().trim(); String dutplceCd = so.getProperty("dutplceCd").toString().trim(); String deptHngNm = so.getProperty("deptHngNm").toString().trim(); String fromDd = so.getProperty("fromDd").toString().trim(); String sortNo = so.getProperty("sortNo").toString().trim(); String deptCd = so.getProperty("deptCd").toString().trim(); String jobKindCd = so.getProperty("jobKindCd").toString().trim(); String jobKindNm = so.getProperty("jobKindNm").toString().trim(); String indexPage = so.getProperty("indexPage").toString().trim(); String userId = so.getProperty("userId").toString().trim(); String userName = so.getProperty("userName").toString().trim(); String drKind = so.getProperty("drKind").toString().trim(); dutplceInstCd = dutplceInstCd.equals(ConsentConfig.RETURN_NULL) ? "" : dutplceInstCd; dutplceInstNm = dutplceInstNm.equals(ConsentConfig.RETURN_NULL) ? "" : dutplceInstNm; dutplceCd = dutplceCd.equals(ConsentConfig.RETURN_NULL) ? "" : dutplceCd; deptHngNm = deptHngNm.equals(ConsentConfig.RETURN_NULL) ? "" : deptHngNm; fromDd = fromDd.equals(ConsentConfig.RETURN_NULL) ? "" : fromDd; sortNo = sortNo.equals(ConsentConfig.RETURN_NULL) ? "" : sortNo; deptCd = deptCd.equals(ConsentConfig.RETURN_NULL) ? "" : deptCd; jobKindCd = jobKindCd.equals(ConsentConfig.RETURN_NULL) ? "" : jobKindCd; jobKindNm = jobKindNm.equals(ConsentConfig.RETURN_NULL) ? "" : jobKindNm; indexPage = indexPage.equals(ConsentConfig.RETURN_NULL) ? "" : indexPage; userId = userId.equals(ConsentConfig.RETURN_NULL) ? "" : userId; userName = userName.equals(ConsentConfig.RETURN_NULL) ? "" : userName; drKind = drKind.equals(ConsentConfig.RETURN_NULL) ? "" : drKind; arrayList.add(new UserLoginDeptList(dutplceInstCd, dutplceInstNm, dutplceCd, deptHngNm, fromDd, sortNo, deptCd, jobKindCd, jobKindNm, indexPage, userId, userName, drKind)); } } return arrayList; } public static ArrayList getWardNDeptList(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if (total == 1) { if (object.getProperty(0) == null) { total = 0; } } } if (total == 0) { } else { for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String deptCd = so.getProperty("deptCd").toString().trim(); String deptNm = so.getProperty("deptNm").toString().trim(); deptCd = deptCd.equals(ConsentConfig.RETURN_NULL) ? "" : deptCd; deptNm = deptNm.equals(ConsentConfig.RETURN_NULL) ? "" : deptNm; arrayList.add(new DeptListVO(deptCd, deptNm)); } } return arrayList; } public static ArrayList getDoctorList(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if (total == 1) { if (object.getProperty(0) == null) { total = 0; } } } if (total == 0) { } else { for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String doctorId = so.getProperty("doctorId").toString().trim(); String doctorNm = so.getProperty("doctorNm").toString().trim(); String doctorKind = so.getProperty("doctorKind").toString().trim(); String drKind = so.getProperty("drKind").toString().trim(); doctorId = doctorId.equals(ConsentConfig.RETURN_NULL) ? "" : doctorId; doctorNm = doctorNm.equals(ConsentConfig.RETURN_NULL) ? "" : doctorNm; doctorKind = doctorKind.equals(ConsentConfig.RETURN_NULL) ? "" : doctorKind; drKind = drKind.equals(ConsentConfig.RETURN_NULL) ? "" : drKind; arrayList.add(new DoctorListVO(doctorId, doctorNm, doctorKind, drKind)); } } return arrayList; } public static ArrayList getPatientList(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if (total == 1) { if (object.getProperty(0) == null) { total = 0; } } } if (total == 0) { } else { for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String pid = so.getProperty("pid").toString().trim(); String inDd = so.getProperty("inDd").toString().trim(); String cretNo = so.getProperty("cretNo").toString().trim(); String ordType = so.getProperty("ordType").toString().trim(); String instCd = so.getProperty("instCd").toString().trim(); String hngNm = so.getProperty("hngNm").toString().trim(); String ordDeptCd = so.getProperty("ordDeptCd").toString().trim(); String doctorId = so.getProperty("doctorId").toString().trim(); String sa = so.getProperty("sa").toString().trim(); String deptNm = so.getProperty("deptNm").toString().trim(); String doctorNm = so.getProperty("doctorNm").toString().trim(); String roomCd = so.getProperty("roomCd").toString().trim(); String opRoomNm = so.getProperty("opRoomNm").toString().trim(); String oprsRvNo = so.getProperty("oprsRvNo").toString().trim(); pid = pid.equals(ConsentConfig.RETURN_NULL) ? "" : pid; inDd = inDd.equals(ConsentConfig.RETURN_NULL) ? "" : inDd; cretNo = cretNo.equals(ConsentConfig.RETURN_NULL) ? "" : cretNo; ordType = ordType.equals(ConsentConfig.RETURN_NULL) ? "" : ordType; instCd = instCd.equals(ConsentConfig.RETURN_NULL) ? "" : instCd; hngNm = hngNm.equals(ConsentConfig.RETURN_NULL) ? "" : hngNm; ordDeptCd = ordDeptCd.equals(ConsentConfig.RETURN_NULL) ? "" : ordDeptCd; doctorId = doctorId.equals(ConsentConfig.RETURN_NULL) ? "" : doctorId; sa = sa.equals(ConsentConfig.RETURN_NULL) ? "" : sa; deptNm = deptNm.equals(ConsentConfig.RETURN_NULL) ? "" : deptNm; doctorNm = doctorNm.equals(ConsentConfig.RETURN_NULL) ? "" : doctorNm; roomCd = roomCd.equals(ConsentConfig.RETURN_NULL) ? "" : roomCd; opRoomNm = opRoomNm.equals(ConsentConfig.RETURN_NULL) ? "" : opRoomNm; oprsRvNo = oprsRvNo.equals(ConsentConfig.RETURN_NULL) ? "" : oprsRvNo; arrayList.add(new PatientListVO(pid, inDd, cretNo, ordType, instCd, hngNm, ordDeptCd, doctorId, sa, deptNm, doctorNm, roomCd, opRoomNm, oprsRvNo)); } } return arrayList; } public static ArrayList getHospitalList(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if(total == 1) { if(object.getProperty(0) == null) { total = 0; } } } if(total == 0) { } else { for(int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String categoryType = so.getProperty("CategoryType").toString().trim(); String categoryId = so.getProperty("CategoryId").toString().trim(); String categoryName = so.getProperty("CategoryName").toString().trim(); categoryType = categoryType.equals(ConsentConfig.RETURN_NULL) ? "" : categoryType; categoryId = categoryId.equals(ConsentConfig.RETURN_NULL) ? "" : categoryId; categoryName = categoryName.equals(ConsentConfig.RETURN_NULL) ? "" : categoryName; arrayList.add(new CategoryVO(categoryType, categoryId, categoryName)); } } return arrayList; } public static ArrayList getConsentList(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if(total == 1) { if(object.getProperty(0) == null) { total = 0; } } } if(total == 0) { } else { for(int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String consentMstRid = so.getProperty("consentMstRid").toString().trim(); String createUserId = so.getProperty("createUserId").toString().trim(); String modifyUserId = so.getProperty("modifyUserId").toString().trim(); String ocrTag = so.getProperty("ocrTag").toString().trim(); String pid = so.getProperty("pid").toString().trim(); String inDd = so.getProperty("inDd").toString().trim(); String ordType = so.getProperty("ordType").toString().trim(); String ordDeptCd = so.getProperty("ordDeptCd").toString().trim(); String cretNo = so.getProperty("cretNo").toString().trim(); String opRsrvNo = so.getProperty("opRsrvNo").toString().trim(); String patientName = so.getProperty("patientName").toString().trim(); String consentState = so.getProperty("consentState").toString().trim(); String consentStateEng = so.getProperty("consentStateEng").toString().trim(); String formCd = so.getProperty("formCd").toString().trim(); String formGuid = so.getProperty("formGuid").toString().trim(); String formName = so.getProperty("formName").toString().trim(); String formRid = so.getProperty("formRid").toString().trim(); String printOnly = so.getProperty("printOnly").toString().trim(); String pageCnt = so.getPrimitiveProperty("printCnt").toString().trim(); String ocrTagPrntYn = so.getProperty("ocrTagPrntYn").toString().trim(); String formPrntNm = so.getProperty("formPrntNm").toString().trim(); String certUseYn = so.getProperty("certUseYn").toString().trim(); String opDiagNm = so.getProperty("opDiagNm").toString().trim(); String opNm = so.getProperty("opNm").toString().trim(); String userDrFlag = so.getProperty("userDrFlag").toString().trim(); String linkFormCd = so.getProperty("linkFormCd").toString().trim(); String jinjeongCd = so.getProperty("jinjeongCd").toString().trim(); String drOnly = so.getProperty("DrOnly").toString().trim(); consentMstRid = consentMstRid.equals(ConsentConfig.RETURN_NULL) ? "" : consentMstRid; createUserId = createUserId.equals(ConsentConfig.RETURN_NULL) ? "" : createUserId; modifyUserId = modifyUserId.equals(ConsentConfig.RETURN_NULL) ? "" : modifyUserId; ocrTag = ocrTag.equals(ConsentConfig.RETURN_NULL) ? "" : ocrTag; pid = pid.equals(ConsentConfig.RETURN_NULL) ? "" : pid; inDd = inDd.equals(ConsentConfig.RETURN_NULL) ? "" : inDd; ordType = ordType.equals(ConsentConfig.RETURN_NULL) ? "" : ordType; ordDeptCd = ordDeptCd.equals(ConsentConfig.RETURN_NULL) ? "" : ordDeptCd; cretNo = cretNo.equals(ConsentConfig.RETURN_NULL) ? "" : cretNo; opRsrvNo = opRsrvNo.equals(ConsentConfig.RETURN_NULL) ? "" : opRsrvNo; patientName = patientName.equals(ConsentConfig.RETURN_NULL) ? "" : patientName; consentState = consentState.equals(ConsentConfig.RETURN_NULL) ? "" : consentState; consentStateEng = consentStateEng.equals(ConsentConfig.RETURN_NULL) ? "" : consentStateEng; formCd = formCd.equals(ConsentConfig.RETURN_NULL) ? "" : formCd; formGuid = formGuid.equals(ConsentConfig.RETURN_NULL) ? "" : formGuid; formName = formName.equals(ConsentConfig.RETURN_NULL) ? "" : formName; formRid = formRid.equals(ConsentConfig.RETURN_NULL) ? "" : formRid; printOnly = printOnly.equals(ConsentConfig.RETURN_NULL) ? "" : printOnly; pageCnt = pageCnt.equals(ConsentConfig.RETURN_NULL) ? "" : pageCnt; ocrTagPrntYn = ocrTagPrntYn.equals(ConsentConfig.RETURN_NULL) ? "" : ocrTagPrntYn; formPrntNm = formPrntNm.equals(ConsentConfig.RETURN_NULL) ? "" : formPrntNm; certUseYn = certUseYn.equals(ConsentConfig.RETURN_NULL) ? "" : certUseYn; opDiagNm = opDiagNm.equals(ConsentConfig.RETURN_NULL) ? "" : opDiagNm; opNm = opNm.equals(ConsentConfig.RETURN_NULL) ? "" : opNm; userDrFlag = userDrFlag.equals(ConsentConfig.RETURN_NULL) ? "" : userDrFlag; linkFormCd = linkFormCd.equals(ConsentConfig.RETURN_NULL) ? "" : linkFormCd; jinjeongCd = jinjeongCd.equals(ConsentConfig.RETURN_NULL) ? "" : jinjeongCd; drOnly = drOnly.equals(ConsentConfig.RETURN_NULL) ? "" : drOnly; arrayList.add(new ConsentFormListVO(consentMstRid, createUserId, modifyUserId, ocrTag, pid, inDd, ordType, ordDeptCd, cretNo, opRsrvNo, patientName, consentState, consentStateEng, formCd, formGuid, formName, formRid, printOnly, pageCnt, ocrTagPrntYn, formPrntNm, certUseYn, opDiagNm, opNm, userDrFlag, linkFormCd, jinjeongCd, drOnly)); } } return arrayList; } public static PatientInfoVO getPatientInfo(SoapObject object) { PatientInfoVO patientInfoVO = null; int total = 0; if (object != null) { total = object.getPropertyCount(); if(total == 1) { if(object.getProperty(0) == null) { total = 0; } } } if(total == 0) { } else { patientInfoVO = new PatientInfoVO(); for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String ordDeptCd = so.getProperty("ordDeptCd").toString().trim(); String deptEngAbbr = so.getProperty("deptEngAbbr").toString().trim(); String ordDeptNm = so.getProperty("ordDeptNm").toString().trim(); String pid = so.getProperty("pid").toString().trim(); String cretNo = so.getProperty("cretNo").toString().trim(); String roomCd = so.getProperty("roomCd").toString().trim(); String inDd = so.getProperty("inDd").toString().trim(); String dschDd = so.getProperty("dschDd").toString().trim(); String ordType = so.getProperty("ordType").toString().trim(); String instCd = so.getProperty("instCd").toString().trim(); String mainDrId = so.getProperty("mainDrId").toString().trim(); String mainDrName = so.getProperty("mainDrName").toString().trim(); String erDrNm = so.getProperty("erDrNm").toString().trim(); String firstRgstDt = so.getProperty("firstRgstDt").toString().trim(); String sa = so.getProperty("sa").toString().trim(); String patientName = so.getProperty("patientName").toString().trim(); String juminNo = so.getProperty("juminNo").toString().trim(); String zipCdAddr = so.getProperty("zipCdAddr").toString().trim(); String telNum = so.getProperty("telNum").toString().trim(); String insuKind = so.getProperty("insuKind").toString().trim(); String ward = so.getProperty("ward").toString().trim(); String dxCd = so.getProperty("dxCd").toString().trim(); String dxNm = so.getProperty("dxNm").toString().trim(); String gbn = so.getProperty("gbn").toString().trim(); String opDeptCd = so.getProperty("opDeptCd").toString().trim(); String opDeptNm = so.getProperty("opDeptNm").toString().trim(); String opDrNm = so.getProperty("opDrNm").toString().trim(); String opDrId = so.getProperty("opDrId").toString().trim(); String opCnfmDd = so.getProperty("opCnfmDd").toString().trim(); String perfDrNm = so.getProperty("perfDrNm").toString().trim(); String perfDrFlag = so.getProperty("perfDrFlag").toString().trim(); String perfDrDept = so.getProperty("perfDrDept").toString().trim(); String opDiagNm = so.getProperty("opDiagNm").toString().trim(); String opNm = so.getProperty("opNm").toString().trim(); String anstDrNm1 = so.getProperty("anstDrNm1").toString().trim(); String anstDrFlag1 = so.getProperty("anstDrFlag1").toString().trim(); String anstDeptNm1 = so.getProperty("anstDeptNm1").toString().trim(); String anstDrNm2 = so.getProperty("anstDrNm2").toString().trim(); String anstDrFlag2 = so.getProperty("anstDrFlag2").toString().trim(); String anstDeptNm2 = so.getProperty("anstDeptNm2").toString().trim(); String anstDrNm3 = so.getProperty("anstDrNm3").toString().trim(); String anstDrFlag3 = so.getProperty("anstDrFlag3").toString().trim(); String anstDeptNm3 = so.getProperty("anstDeptNm3").toString().trim(); String opRsrvNo = so.getProperty("opRsrvNo").toString().trim(); String orderNo = so.getProperty("orderNo").toString().trim(); String printTime = so.getProperty("printTime").toString().trim(); String ocrCd = so.getProperty("ocrCd").toString().trim(); String inputId = so.getProperty("inputId").toString().trim(); String inputNm = so.getProperty("inputNm").toString().trim(); String signImg = so.getProperty("signImg").toString().trim(); String bp = so.getProperty("bp").toString().trim(); String dm = so.getProperty("dm").toString().trim(); String heart = so.getProperty("heart").toString().trim(); String kidney = so.getProperty("kidney").toString().trim(); String respiration = so.getProperty("respiration").toString().trim(); String hx = so.getProperty("hx").toString().trim(); String allergy = so.getProperty("allergy").toString().trim(); String drug = so.getProperty("drug").toString().trim(); String smoking = so.getProperty("smoking").toString().trim(); String idio = so.getProperty("idio").toString().trim(); String nacrotics = so.getProperty("nacrotics").toString().trim(); String airway = so.getProperty("airway").toString().trim(); String hemorrhage = so.getProperty("hemorrhage").toString().trim(); String statusEtc = so.getProperty("statusEtc").toString().trim(); ordDeptCd = ordDeptCd.equals(ConsentConfig.RETURN_NULL) ? "" : ordDeptCd; deptEngAbbr = deptEngAbbr.equals(ConsentConfig.RETURN_NULL) ? "" : deptEngAbbr; ordDeptNm = ordDeptNm.equals(ConsentConfig.RETURN_NULL) ? "" : ordDeptNm; pid = pid.equals(ConsentConfig.RETURN_NULL) ? "" : pid; cretNo = cretNo.equals(ConsentConfig.RETURN_NULL) ? "" : cretNo; roomCd = roomCd.equals(ConsentConfig.RETURN_NULL) ? "" : roomCd; inDd = inDd .equals(ConsentConfig.RETURN_NULL) ? "" : inDd; dschDd = dschDd.equals(ConsentConfig.RETURN_NULL) ? "" : dschDd; ordType = ordType.equals(ConsentConfig.RETURN_NULL) ? "" : ordType; instCd = instCd.equals(ConsentConfig.RETURN_NULL) ? "" : instCd; mainDrId = mainDrId.equals(ConsentConfig.RETURN_NULL) ? "" : mainDrId; mainDrName = mainDrName.equals(ConsentConfig.RETURN_NULL) ? "" : mainDrName; erDrNm = erDrNm.equals(ConsentConfig.RETURN_NULL) ? "" : erDrNm; firstRgstDt = firstRgstDt.equals(ConsentConfig.RETURN_NULL) ? "" : firstRgstDt; sa = sa.equals(ConsentConfig.RETURN_NULL) ? "" : sa; patientName = patientName.equals(ConsentConfig.RETURN_NULL) ? "" : patientName; juminNo = juminNo.equals(ConsentConfig.RETURN_NULL) ? "" : juminNo; zipCdAddr = zipCdAddr.equals(ConsentConfig.RETURN_NULL) ? "" : zipCdAddr; telNum = telNum.equals(ConsentConfig.RETURN_NULL) ? "" : telNum; insuKind = insuKind.equals(ConsentConfig.RETURN_NULL) ? "" : insuKind; ward = ward.equals(ConsentConfig.RETURN_NULL) ? "" : ward; dxCd = dxCd.equals(ConsentConfig.RETURN_NULL) ? "" : dxCd; dxNm = dxNm.equals(ConsentConfig.RETURN_NULL) ? "" : dxNm; gbn = gbn.equals(ConsentConfig.RETURN_NULL) ? "" : gbn; opDeptCd = opDeptCd.equals(ConsentConfig.RETURN_NULL) ? "" : opDeptCd; opDeptNm = opDeptNm.equals(ConsentConfig.RETURN_NULL) ? "" : opDeptNm; opDrNm = opDrNm.equals(ConsentConfig.RETURN_NULL) ? "" : opDrNm; opDrId = opDrId.equals(ConsentConfig.RETURN_NULL) ? "" : opDrId; opCnfmDd = opCnfmDd.equals(ConsentConfig.RETURN_NULL) ? "" : opCnfmDd; perfDrNm = perfDrNm.equals(ConsentConfig.RETURN_NULL) ? "" : perfDrNm; perfDrFlag = perfDrFlag.equals(ConsentConfig.RETURN_NULL) ? "" : perfDrFlag; perfDrDept = perfDrDept.equals(ConsentConfig.RETURN_NULL) ? "" : perfDrDept; opDiagNm = opDiagNm.equals(ConsentConfig.RETURN_NULL) ? "" : opDiagNm; opNm = opNm.equals(ConsentConfig.RETURN_NULL) ? "" : opNm; anstDrNm1 = anstDrNm1.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrNm1; anstDrFlag1 = anstDrFlag1.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrFlag1; anstDeptNm1 = anstDeptNm1.equals(ConsentConfig.RETURN_NULL) ? "" : anstDeptNm1; anstDrNm2 = anstDrNm2.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrNm2; anstDrFlag2 = anstDrFlag2.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrFlag2; anstDeptNm2 = anstDeptNm2.equals(ConsentConfig.RETURN_NULL) ? "" : anstDeptNm2; anstDrNm3 = anstDrNm3.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrNm3; anstDrFlag3 = anstDrFlag3.equals(ConsentConfig.RETURN_NULL) ? "" : anstDrFlag3; anstDeptNm3 = anstDeptNm3.equals(ConsentConfig.RETURN_NULL) ? "" : anstDeptNm3; opRsrvNo = opRsrvNo.equals(ConsentConfig.RETURN_NULL) ? "" : opRsrvNo; orderNo = orderNo.equals(ConsentConfig.RETURN_NULL) ? "" : orderNo; printTime = printTime.equals(ConsentConfig.RETURN_NULL) ? "" : printTime; ocrCd = ocrCd.equals(ConsentConfig.RETURN_NULL) ? "" : ocrCd; inputId = inputId.equals(ConsentConfig.RETURN_NULL) ? "" : inputId; inputNm = inputNm.equals(ConsentConfig.RETURN_NULL) ? "" : inputNm; signImg = signImg.equals(ConsentConfig.RETURN_NULL) ? "" : signImg; bp = bp.equals(ConsentConfig.RETURN_NULL) ? "" : bp; dm = dm.equals(ConsentConfig.RETURN_NULL) ? "" : dm; heart = heart.equals(ConsentConfig.RETURN_NULL) ? "" : heart; kidney = kidney.equals(ConsentConfig.RETURN_NULL) ? "" : kidney; respiration = respiration.equals(ConsentConfig.RETURN_NULL) ? "" : respiration; hx = hx.equals(ConsentConfig.RETURN_NULL) ? "" : hx; allergy = allergy.equals(ConsentConfig.RETURN_NULL) ? "" : allergy; drug = drug.equals(ConsentConfig.RETURN_NULL) ? "" : drug; smoking = smoking.equals(ConsentConfig.RETURN_NULL) ? "" : smoking; idio = idio.equals(ConsentConfig.RETURN_NULL) ? "" : idio; nacrotics = nacrotics.equals(ConsentConfig.RETURN_NULL) ? "" : nacrotics; airway = airway.equals(ConsentConfig.RETURN_NULL) ? "" : airway; hemorrhage = hemorrhage.equals(ConsentConfig.RETURN_NULL) ? "" : hemorrhage; statusEtc = statusEtc.equals(ConsentConfig.RETURN_NULL) ? "" : statusEtc; patientInfoVO.setOrdDeptCd(ordDeptCd); patientInfoVO.setDeptEngAbbr(deptEngAbbr); patientInfoVO.setOrdDeptNm(ordDeptNm); patientInfoVO.setPid(pid); patientInfoVO.setCretNo(cretNo); patientInfoVO.setRoomCd(roomCd); patientInfoVO.setInDd(inDd); patientInfoVO.setDschDd(dschDd); patientInfoVO.setOrdType(ordType); patientInfoVO.setInstCd(instCd); patientInfoVO.setMainDrId(mainDrId); patientInfoVO.setMainDrName(mainDrName); patientInfoVO.setErDrNm(erDrNm); patientInfoVO.setFirstRgstDt(firstRgstDt); patientInfoVO.setSa(sa); patientInfoVO.setPatientName(patientName); patientInfoVO.setJuminNo(juminNo); patientInfoVO.setZipCdAddr(zipCdAddr); patientInfoVO.setTelNum(telNum); patientInfoVO.setInsuKind(insuKind); patientInfoVO.setWard(ward); patientInfoVO.setDxCd(dxCd); patientInfoVO.setDxNm(dxNm); patientInfoVO.setGbn(gbn); patientInfoVO.setOpDeptCd(opDeptCd); patientInfoVO.setOpDeptNm(opDeptNm); patientInfoVO.setOpDrNm(opDrNm); patientInfoVO.setOpDrId(opDrId); patientInfoVO.setOpCnfmDd(opCnfmDd); patientInfoVO.setPerfDrNm(perfDrNm); patientInfoVO.setPerfDrFlag(perfDrFlag); patientInfoVO.setPerfDrDept(perfDrDept); patientInfoVO.setOpDiagNm(opDiagNm); patientInfoVO.setOpNm(opNm); patientInfoVO.setAnstDrNm1(anstDrNm1); patientInfoVO.setAnstDrFlag1(anstDrFlag1); patientInfoVO.setAnstDeptNm1(anstDeptNm1); patientInfoVO.setAnstDrNm2(anstDrNm2); patientInfoVO.setAnstDrFlag2(anstDrFlag2); patientInfoVO.setAnstDeptNm2(anstDeptNm2); patientInfoVO.setAnstDrNm3(anstDrNm3); patientInfoVO.setAnstDrFlag3(anstDrFlag3); patientInfoVO.setAnstDeptNm3(anstDeptNm3); patientInfoVO.setOpRsrvNo(opRsrvNo); patientInfoVO.setOrderNo(orderNo); patientInfoVO.setPrintTime(printTime); patientInfoVO.setOcrCd(ocrCd); patientInfoVO.setInputId(inputId); patientInfoVO.setInputNm(inputNm); patientInfoVO.setSignImg(signImg); patientInfoVO.setBp(bp); patientInfoVO.setDm(dm); patientInfoVO.setHeart(heart); patientInfoVO.setKidney(kidney); patientInfoVO.setRespiration(respiration); patientInfoVO.setHx(hx); patientInfoVO.setAllergy(allergy); patientInfoVO.setDrug(drug); patientInfoVO.setSmoking(smoking); patientInfoVO.setIdio(idio); patientInfoVO.setNacrotics(nacrotics); patientInfoVO.setAirway(airway); patientInfoVO.setHemorrhage(hemorrhage); patientInfoVO.setStatusEtc(statusEtc); } } return patientInfoVO; } public static ArrayList getConsentImage(SoapObject object) { ArrayList arrayList = new ArrayList(); int total = 0; if (object != null) { total = object.getPropertyCount(); if(total == 1) { if(object.getProperty(0) == null) { total = 0; } } } if(total == 0) { } else { for (int i = 0; i < total; i++) { SoapObject so = (SoapObject) object.getProperty(i); String imagePath = so.getProperty("ImagePath").toString().trim(); String imageFileName = so.getProperty("ImageFilename").toString().trim(); arrayList.add(new ConsentImageVO(imagePath, imageFileName)); } } return arrayList; } public static UserSignDataInfoVO getUserSignDataInfo(SoapObject object) { UserSignDataInfoVO userSignDataInfoVO = null; int total = 0; if (object != null) { total = object.getPropertyCount(); if(total == 1) { if(object.getProperty(0) == null) { total = 0; } } } if(total == 0) { } else { userSignDataInfoVO = new UserSignDataInfoVO(); String instCd = object.getPrimitivePropertyAsString("instCd").trim(); String userId = object.getPrimitivePropertyAsString("userId").trim(); String userNm = object.getPrimitivePropertyAsString("userNm").trim(); String signData = ""; String signImageFromDd = object.getPrimitivePropertyAsString("signImgeFromDd").trim(); String signImageSeqNo = object.getPrimitivePropertyAsString("signImgeSeqNo").trim(); try { signData = object.getPrimitivePropertyAsString("signData").trim(); } catch (Exception e) { } instCd = instCd.equals(ConsentConfig.RETURN_NULL) ? "" : instCd; userId = userId.equals(ConsentConfig.RETURN_NULL) ? "" : userId; userNm = userNm.equals(ConsentConfig.RETURN_NULL) ? "" : userNm; signData = signData.equals(ConsentConfig.RETURN_NULL) ? "" : signData; signImageFromDd = signImageFromDd.equals(ConsentConfig.RETURN_NULL) ? "" : signImageFromDd; signImageSeqNo = signImageSeqNo.equals(ConsentConfig.RETURN_NULL) ? "" : signImageSeqNo; userSignDataInfoVO.setInstCd(instCd); userSignDataInfoVO.setUserId(userId); userSignDataInfoVO.setUserNm(userNm); userSignDataInfoVO.setSignData(signData); userSignDataInfoVO.setSignImageFromDd(signImageFromDd); userSignDataInfoVO.setSignImageSeqNo(signImageSeqNo); } return userSignDataInfoVO; } }