imsweb / algorithms

Java implementation of cancer-related algorithms (NHIA, NAPIIA, Survival Time, etc...)
Other
6 stars 6 forks source link

Race Recode #191

Closed howew closed 3 months ago

howew commented 3 months ago

The race1Recode field has to be added to algorithms. The code from seer recodes is attached.

I took the original code and removed the line that sets the "Naaccr" version of the recode, since we aren't interested in that one and I've added a condition to not recode the race if addrAtDxState = "AK".

raceRecode.txt

howew commented 3 months ago
    <ItemDef naaccrId="race1Recode"
            naaccrNum="9460"
            naaccrName="Race 1 Recode"
            length="1"
            recordTypes="A,M,C,I"
            parentXmlElement="Patient"/>   
depryf commented 3 months ago

The code references multiple constants. We need the values for those.

RACE_WHITE=1 RACE_BLACK=2 RACE_AIAN=? RACE_LAST_SPECIFIC=? RACE_NONE=? RACE_OTHER=98 RACE_UNKNOWN=99 IHS_INVALID=? IHS_MATCH=?

Also, this logic checks the the state is not AK, but that's a tumor field. The recode is a patient-level field. The best we can do is to check that none of the tumors has an AK state.

Also, we usually start the algorithm names with the organization that "owns" the algorithm. Is this owned/maintained by SEER?

howew commented 3 months ago

I think checking that none of the tumors are from AK is fine.

Yes, I would say SEER owns it.

The constants are:

public static final String IHS_INVALID = "9";
public static final String IHS_MATCH = "1";
public static final int RACE_WHITE = 1;
public static final int RACE_BLACK = 2;
public static final int RACE_AIAN = 3;
public static final int RACE_NONE = 88;
public static final int RACE_LAST_SPECIFIC = 97;
public static final int RACE_OTHER = 98;
public static final int RACE_UNKNOWN = 99;
public static final String RECODE_WHITE = "1";
public static final String RECODE_BLACK = "2";
public static final String RECODE_AIAN = "3";
public static final String RECODE_OTHER = "3";
public static final String RECODE_API = "4";
public static final String RECODE_UNKNOWN = "9";
public static final String NHIA_INVALID = "9";
public static final String NHIA_NONHISP = "0";
public static final String NHIA_HISP = "1";
public static final String ASIAN_UNKNOWN = "99";
public static final String ASIAN_FLAG_NO = "0";