com.imsweb.algorithms.seersiterecode.SeerSiteRecode2023Algorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of algorithms Show documentation
Show all versions of algorithms Show documentation
Java implementation of cancer-related algorithms (NHIA, NAPIIA, Survival Time, etc...)
/*
* Copyright (C) 2020 Information Management Services, Inc.
*/
package com.imsweb.algorithms.seersiterecode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.imsweb.algorithms.AbstractAlgorithm;
import com.imsweb.algorithms.AlgorithmInput;
import com.imsweb.algorithms.AlgorithmOutput;
import com.imsweb.algorithms.Algorithms;
import com.imsweb.algorithms.internal.Utils;
import static com.imsweb.algorithms.Algorithms.FIELD_BEHAV_O3;
import static com.imsweb.algorithms.Algorithms.FIELD_DX_DATE;
import static com.imsweb.algorithms.Algorithms.FIELD_HIST_O3;
import static com.imsweb.algorithms.Algorithms.FIELD_PRIMARY_SITE;
import static com.imsweb.algorithms.Algorithms.FIELD_SEER_SITE_RECODE;
import static com.imsweb.algorithms.Algorithms.FIELD_SEER_SITE_RECODE_2023;
import static com.imsweb.algorithms.Algorithms.FIELD_SEER_SITE_RECODE_2023_EXPANDED;
import static com.imsweb.algorithms.Algorithms.FIELD_TUMORS;
public class SeerSiteRecode2023Algorithm extends AbstractAlgorithm {
public SeerSiteRecode2023Algorithm() {
super(Algorithms.ALG_SEER_SITE_RECODE_2023, SeerSiteRecodeUtils.ALG_NAME, SeerSiteRecodeUtils.VERSION_2023);
_url = "https://seer.cancer.gov/siterecode/icdo3_2023/";
_inputFields.add(Algorithms.getField(FIELD_PRIMARY_SITE));
_inputFields.add(Algorithms.getField(FIELD_HIST_O3));
_inputFields.add(Algorithms.getField(FIELD_BEHAV_O3));
_inputFields.add(Algorithms.getField(FIELD_DX_DATE));
_outputFields.add(Algorithms.getField(FIELD_SEER_SITE_RECODE_2023));
_outputFields.add(Algorithms.getField(FIELD_SEER_SITE_RECODE_2023_EXPANDED));
_unknownValues.put(FIELD_SEER_SITE_RECODE, Collections.singletonList(SeerSiteRecodeUtils.UNKNOWN_RECODE_2023));
}
@Override
public AlgorithmOutput execute(AlgorithmInput input) {
Map outputPatient = new HashMap<>();
List