-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JAR files and New Dto objects for REST response
* The jar files required by the project has been added to the repository. This will make sure that the jar files versions can be managed properly. * Added new DTO objects to build the REST response of the parsed claim. The ProcedureDto stores information about the procedure, ServiceInformationDto will store information about the service information details. * The .gitignore file has been updated to not ignore jar files from now on.
- Loading branch information
Shubham Bansal
committed
Jun 27, 2012
1 parent
635acb3
commit 572c33a
Showing
25 changed files
with
299 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ | |
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,49 @@ | ||
package com.parser.dto; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.codehaus.jackson.annotate.JsonIgnoreProperties; | ||
|
||
import com.parser.model.Claim; | ||
import com.parser.model.ServiceInformation; | ||
|
||
@XmlRootElement | ||
@XmlAccessorType(XmlAccessType.PROPERTY) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ClaimDto { | ||
|
||
private String providerName; | ||
private String insuranceProvider; | ||
private List<ServiceInformationDto> serviceInformations = new ArrayList<ServiceInformationDto>(); | ||
|
||
public ClaimDto() {} | ||
|
||
public ClaimDto(String provider) { | ||
this.providerName = provider; | ||
public ClaimDto(Claim claim) { | ||
this.insuranceProvider = claim.getInsuranceProvider(); | ||
for (ServiceInformation serviceInformation : claim.getServiceInformations()) { | ||
ServiceInformationDto serviceDto = new ServiceInformationDto(serviceInformation); | ||
serviceInformations.add(serviceDto); | ||
} | ||
} | ||
|
||
public String getInsuranceProvider() { | ||
return insuranceProvider; | ||
} | ||
|
||
public void setInsuranceProvider(String insuranceProvider) { | ||
this.insuranceProvider = insuranceProvider; | ||
} | ||
|
||
public String getProviderName() { | ||
return providerName; | ||
public List<ServiceInformationDto> getServiceInformations() { | ||
return serviceInformations; | ||
} | ||
|
||
public void setProviderName(String providerName) { | ||
this.providerName = providerName; | ||
public void setServiceInformations(List<ServiceInformationDto> serviceInformations) { | ||
this.serviceInformations = serviceInformations; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.parser.dto; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
@XmlRootElement | ||
public class ListOfProceduresDto { | ||
|
||
private List<ProcedureDto> procedures; | ||
|
||
protected ListOfProceduresDto() { | ||
} | ||
|
||
public ListOfProceduresDto(List<ProcedureDto> procedures) { | ||
this.procedures = procedures; | ||
} | ||
|
||
public List<ProcedureDto> getProcedures() { | ||
return procedures; | ||
} | ||
|
||
public void setProcedures(List<ProcedureDto> procedures) { | ||
this.procedures = procedures; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.parser.dto; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
/** | ||
* Dto object for storing a list of <code>ServiceInformationDto</code> | ||
* @author shubhambansal | ||
* | ||
*/ | ||
@XmlRootElement | ||
public class ListOfServiceInformationsDto { | ||
|
||
private List<ServiceInformationDto> serviceInformations; | ||
|
||
protected ListOfServiceInformationsDto() { | ||
} | ||
|
||
public ListOfServiceInformationsDto(List<ServiceInformationDto> serviceInformations) { | ||
this.serviceInformations = serviceInformations; | ||
} | ||
|
||
public List<ServiceInformationDto> getServiceInformations() { | ||
return serviceInformations; | ||
} | ||
|
||
public void setServiceInformations( | ||
List<ServiceInformationDto> serviceInformations) { | ||
this.serviceInformations = serviceInformations; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.parser.dto; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.codehaus.jackson.annotate.JsonIgnoreProperties; | ||
|
||
import com.parser.model.Procedure; | ||
|
||
@XmlRootElement | ||
@XmlAccessorType(XmlAccessType.PROPERTY) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ProcedureDto { | ||
|
||
private String procedureName; | ||
private String serviceDate; | ||
private String amountBilled; | ||
private String amountCovered; | ||
private String amountNotCovered; | ||
|
||
public ProcedureDto() { | ||
} | ||
|
||
public ProcedureDto(Procedure procedure) { | ||
this.procedureName = procedure.getName(); | ||
this.serviceDate = procedure.getServiceDate(); | ||
this.amountBilled = procedure.getAmountBilled(); | ||
this.amountCovered = procedure.getAmountCovered(); | ||
this.amountNotCovered = procedure.getAmountNotCovered(); | ||
} | ||
|
||
public String getProcedureName() { | ||
return procedureName; | ||
} | ||
|
||
public void setProcedureName(String procedureName) { | ||
this.procedureName = procedureName; | ||
} | ||
|
||
public String getServiceDate() { | ||
return serviceDate; | ||
} | ||
|
||
public void setServiceDate(String serviceDate) { | ||
this.serviceDate = serviceDate; | ||
} | ||
|
||
public String getAmountBilled() { | ||
return amountBilled; | ||
} | ||
|
||
public void setAmountBilled(String amountBilled) { | ||
this.amountBilled = amountBilled; | ||
} | ||
|
||
public String getAmountCovered() { | ||
return amountCovered; | ||
} | ||
|
||
public void setAmountCovered(String amountCovered) { | ||
this.amountCovered = amountCovered; | ||
} | ||
|
||
public String getAmountNotCovered() { | ||
return amountNotCovered; | ||
} | ||
|
||
public void setAmountNotCovered(String amountNotCovered) { | ||
this.amountNotCovered = amountNotCovered; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
package com.parser.dto; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.codehaus.jackson.annotate.JsonIgnoreProperties; | ||
|
||
import com.parser.model.Procedure; | ||
import com.parser.model.ServiceInformation; | ||
|
||
@XmlRootElement | ||
@XmlAccessorType(XmlAccessType.PROPERTY) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ServiceInformationDto { | ||
|
||
private String totalAmountBilled; | ||
private String totalNotCovered; | ||
private String totalCovered; | ||
private String ppoReduction; | ||
private String coinsuranceAmount; | ||
private String totalDeductions; | ||
private String totalBenefitsApproved; | ||
private String amountOwedToProvider; | ||
|
||
private List<ProcedureDto> procedures = new ArrayList<ProcedureDto>(); | ||
|
||
protected ServiceInformationDto() { | ||
} | ||
|
||
public ServiceInformationDto(ServiceInformation serviceInformation) { | ||
this.totalAmountBilled = checkString(serviceInformation.getTotalAmountBilled()); | ||
this.totalNotCovered = checkString(serviceInformation.getTotalNotCovered()); | ||
this.totalCovered = checkString(serviceInformation.getTotalCovered()); | ||
this.ppoReduction = checkString(serviceInformation.getPpoReduction()); | ||
this.coinsuranceAmount = checkString(serviceInformation.getPpoReduction()); | ||
this.totalDeductions = checkString(serviceInformation.getTotalDeductions()); | ||
this.totalBenefitsApproved = checkString(serviceInformation.getTotalBenefitsApproved()); | ||
this.amountOwedToProvider = checkString(serviceInformation.getAmountOwedToProvider()); | ||
|
||
for (Procedure procedure : serviceInformation.getProcedures()) { | ||
ProcedureDto procedureDto = new ProcedureDto(procedure); | ||
procedures.add(procedureDto); | ||
} | ||
} | ||
|
||
private String checkString(Object value) { | ||
if(value == null) { | ||
return null; | ||
} | ||
return value.toString(); | ||
} | ||
|
||
public String getTotalAmountBilled() { | ||
return totalAmountBilled; | ||
} | ||
|
||
public void setTotalAmountBilled(String totalAmountBilled) { | ||
this.totalAmountBilled = totalAmountBilled; | ||
} | ||
|
||
public String getTotalNotCovered() { | ||
return totalNotCovered; | ||
} | ||
|
||
public void setTotalNotCovered(String totalNotCovered) { | ||
this.totalNotCovered = totalNotCovered; | ||
} | ||
|
||
public String getTotalCovered() { | ||
return totalCovered; | ||
} | ||
|
||
public void setTotalCovered(String totalCovered) { | ||
this.totalCovered = totalCovered; | ||
} | ||
|
||
public String getPpoReduction() { | ||
return ppoReduction; | ||
} | ||
|
||
public void setPpoReduction(String ppoReduction) { | ||
this.ppoReduction = ppoReduction; | ||
} | ||
|
||
public String getCoinsuranceAmount() { | ||
return coinsuranceAmount; | ||
} | ||
|
||
public void setCoinsuranceAmount(String coinsuranceAmount) { | ||
this.coinsuranceAmount = coinsuranceAmount; | ||
} | ||
|
||
public String getTotalDeductions() { | ||
return totalDeductions; | ||
} | ||
|
||
public void setTotalDeductions(String totalDeductions) { | ||
this.totalDeductions = totalDeductions; | ||
} | ||
|
||
public String getTotalBenefitsApproved() { | ||
return totalBenefitsApproved; | ||
} | ||
|
||
public void setTotalBenefitsApproved(String totalBenefitsApproved) { | ||
this.totalBenefitsApproved = totalBenefitsApproved; | ||
} | ||
|
||
public String getAmountOwedToProvider() { | ||
return amountOwedToProvider; | ||
} | ||
|
||
public void setAmountOwedToProvider(String amountOwedToProvider) { | ||
this.amountOwedToProvider = amountOwedToProvider; | ||
} | ||
|
||
public List<ProcedureDto> getProcedures() { | ||
return procedures; | ||
} | ||
|
||
public void setProcedures(List<ProcedureDto> procedures) { | ||
this.procedures = procedures; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters