use of com.redhat.naps.process.model.SepsisResponse in project himss_2021_sepsis_detection by redhat-na-ssa.
the class SepsisDetectionWIH method executeWorkItem.
@Override
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
PatientVitals vitals = (PatientVitals) workItem.getParameter(FHIRUtil.PATIENT_VITALS);
if (vitals == null)
throw new RuntimeException("must pass the following workItem: " + FHIRUtil.PATIENT_VITALS);
ResponseEntity<SepsisResponse> sResponse = template.postForEntity(aimodelUrl, vitals, SepsisResponse.class);
SepsisResponse response = sResponse.getBody();
workItem.getParameters().put(FHIRUtil.SEPSIS_RESPONSE, Integer.toString(response.getIssepsis()));
log.debug("executeWorkItem() sepsisResponse = " + response.getIssepsis());
manager.completeWorkItem(workItem.getId(), workItem.getParameters());
}
Aggregations