Search in sources :

Example 1 with SepsisResponse

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());
}
Also used : PatientVitals(com.redhat.naps.process.model.PatientVitals) SepsisResponse(com.redhat.naps.process.model.SepsisResponse)

Aggregations

PatientVitals (com.redhat.naps.process.model.PatientVitals)1 SepsisResponse (com.redhat.naps.process.model.SepsisResponse)1