use of com.salaboy.jbpm5.dev.guide.model.Patient in project jBPM5-Developer-Guide by Salaboy.
the class GetPatientDataCommand method execute.
public ExecutionResults execute(CommandContext ctx) throws MalformedURLException {
String patientId = (String) ctx.getData("gatherdata_patientName");
InsuranceService client = getClient();
Patient patientData = client.getPatientData(patientId);
ExecutionResults executionResults = new ExecutionResults();
executionResults.setData("gatherdata_patient", patientData);
return executionResults;
}
use of com.salaboy.jbpm5.dev.guide.model.Patient in project jBPM5-Developer-Guide by Salaboy.
the class NotifyAndChargePatientCommand method execute.
public ExecutionResults execute(CommandContext ctx) {
Patient patient = (Patient) ctx.getData("invoice_patient");
BigDecimal finalAmount = (BigDecimal) ctx.getData("invoice_finalAmount");
List<ConceptCode> concepts = (List<ConceptCode>) ctx.getData("invoice_concepts");
boolean patientNotified = false;
try {
InsuranceService client = getClient();
patientNotified = client.notifyAndChargePatient(patient, finalAmount, concepts);
} catch (MalformedURLException ex) {
ex.printStackTrace();
}
System.out.println(" >>> Patient Notified = " + patientNotified);
ExecutionResults results = new ExecutionResults();
results.setData("invoice_patientNotified", patientNotified);
return results;
}
Aggregations