use of com.salaboy.jbpm5.dev.guide.webservice.InsuranceService in project jBPM5-Developer-Guide by Salaboy.
the class CalculateHospitalRatesCommand method getClient.
private InsuranceService getClient() throws MalformedURLException {
URL wsdlURL = new URL("http://127.0.0.1:19999/InsuranceServiceImpl/insurance?WSDL");
QName SERVICE_QNAME = new QName("http://webservice.guide.dev.jbpm5.salaboy.com/", "InsuranceServiceImplService");
Service service = Service.create(wsdlURL, SERVICE_QNAME);
InsuranceService client = service.getPort(InsuranceService.class);
return client;
}
use of com.salaboy.jbpm5.dev.guide.webservice.InsuranceService in project jBPM5-Developer-Guide by Salaboy.
the class GetPatientDataCommand method getClient.
private InsuranceService getClient() throws MalformedURLException {
URL wsdlURL = new URL("http://127.0.0.1:19999/InsuranceServiceImpl/insurance?WSDL");
QName SERVICE_QNAME = new QName("http://webservice.guide.dev.jbpm5.salaboy.com/", "InsuranceServiceImplService");
Service service = Service.create(wsdlURL, SERVICE_QNAME);
InsuranceService client = service.getPort(InsuranceService.class);
return client;
}
use of com.salaboy.jbpm5.dev.guide.webservice.InsuranceService in project jBPM5-Developer-Guide by Salaboy.
the class NotifyInsuranceCompanyCommand method execute.
public ExecutionResults execute(CommandContext ctx) {
String patientId = (String) ctx.getData("company_patientName");
BigDecimal finalAmount = BigDecimal.ZERO;
try {
InsuranceService client = getClient();
// Fixed rate for insured patients
finalAmount = client.notifyInsuranceCompany("Company 1", patientId, new BigDecimal(100));
} catch (MalformedURLException ex) {
ex.printStackTrace();
}
ExecutionResults results = new ExecutionResults();
results.setData("company_finalAmount", finalAmount);
List<ConceptCode> concepts = new ArrayList<ConceptCode>(1);
concepts.add(new ConceptCode("CO-9999", finalAmount, " Insured Flat Rate", 1));
results.setData("company_concepts", concepts);
return results;
}
use of com.salaboy.jbpm5.dev.guide.webservice.InsuranceService in project jBPM5-Developer-Guide by Salaboy.
the class IsPatientInsuredCommand method execute.
public ExecutionResults execute(CommandContext ctx) {
String patientId = (String) ctx.getData("insured_patientName");
boolean isPatientInsured = false;
try {
InsuranceService client = getClient();
isPatientInsured = client.isPatientInsured(patientId);
} catch (MalformedURLException ex) {
ex.printStackTrace();
}
ExecutionResults results = new ExecutionResults();
results.setData("insured_isPatientInsured", isPatientInsured);
return results;
}
use of com.salaboy.jbpm5.dev.guide.webservice.InsuranceService in project jBPM5-Developer-Guide by Salaboy.
the class InsuranceServiceWorkItemHandler method executeWorkItem.
public void executeWorkItem(WorkItem wi, WorkItemManager wim) {
String patientId = (String) wi.getParameter("insured_patientName");
boolean isPatientInsured = false;
InsuranceService client = getClient();
isPatientInsured = client.isPatientInsured(patientId);
Map<String, Object> result = new HashMap<String, Object>();
result.put("insured_isPatientInsured", isPatientInsured);
wim.completeWorkItem(wi.getId(), result);
}
Aggregations