All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.imsweb.algorithms.AlgorithmOutput Maven / Gradle / Ivy

Go to download

Java implementation of cancer-related algorithms (NHIA, NAPIIA, Survival Time, etc...)

The newest version!
/*
 * Copyright (C) 2019 Information Management Services, Inc.
 */
package com.imsweb.algorithms;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static com.imsweb.algorithms.Algorithms.FIELD_TUMORS;

/**
 * Abstraction of the "output" that an algorithm produces when executed.
 */
public class AlgorithmOutput {

    public static AlgorithmOutput of(Map patient) {
        AlgorithmOutput output = new AlgorithmOutput();
        output.setPatient(patient);
        return output;
    }

    public static AlgorithmOutput of(List> tumors) {
        Map patient = new HashMap<>();
        patient.put(FIELD_TUMORS, tumors);
        return of(patient);
    }

    private Map _patient;

    public Map getPatient() {
        return _patient;
    }

    public void setPatient(Map patient) {
        _patient = patient;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy