---
title: "Compares two tumors and determines if they are multiple primaries"
method: POST
path: "/rest/mph"
tags: ["mph"]
---

# Compares two tumors and determines if they are multiple primaries

`POST /rest/mph`

## Request

- Base URL: `https://api.seer.cancer.gov`
- URL: `https://api.seer.cancer.gov/rest/mph`
- Auth: API key in header `X-SEERAPI-Key`
- TypeScript: <https://skmtc.dev/cancer/apis/seer-api/docs/rest/mph/post.ts> (a function with typed inputs; its response is checked against the schema)

The SEER implementation of the Multiple Primary and Histology Coding Rules. The implementation combines
Hematopoietic rules and the SEER Multiple Primary and Histology Coding Rules.  The rules used in the calculation are based on the
diagnosis year and histology.

If histology is in the range 9590-9993, one of the Hematopoietic set of rules will be used:

- If DX year 2010 and later, the "Hematopoietic 2010+" rules will be used.
- If DX year 2001-2009, the "Hematopoietic 2001-2009" rules will be used.
- If DX year 2000 or earlier, the "Hematopoietic 2000 and earlier" rules will be used.

If histology is not in the range 9590-9993, one of the following solid tumors sets will be used:

Solid Tumor

- 2021+ Cutaneous Melanoma
- 2023+ Other Sites
- 2018+ all other modules

MPH

- 2007-2020 Cutaneous Melanoma
- 2007-2022 Other Sites
- 2007-2017 for all other modules

If DX year is 2006 or earlier and the case is not Benign Brain (C700-C729, C751-C753 with behavior 0/1), the "2006 and earlier Solid Malignant" rules will be used.

If DX year is 2006 or earlier and the case is Benign Brain (C700-C729, C751-C753 with behavior 0/1), the "2006 and earlier Benign Brain" rules will be used.

The API was implemented using the [MPH open source library](https://github.com/imsweb/mph) and incorporates logic from the KCR Multiple
Primary Rules Library developed by the [Kentucky Cancer Registry](https://www.kcr.uky.edu).

## Request body

- MphInputPair
  - `input1` MphInput
    - `primary_site` string
    - `histology_icd_o3` string
    - `histology_icd_o2` string
    - `behavior_icd_o3` string
    - `behavior_icd_o2` string
    - `laterality` string
    - `date_of_diagnosis_year` string
    - `date_of_diagnosis_month` string
    - `date_of_diagnosis_day` string
  - `input2` MphInput
    - `primary_site` string
    - `histology_icd_o3` string
    - `histology_icd_o2` string
    - `behavior_icd_o3` string
    - `behavior_icd_o2` string
    - `laterality` string
    - `date_of_diagnosis_year` string
    - `date_of_diagnosis_month` string
    - `date_of_diagnosis_day` string

## Response `200`

Success

- MphResult
  - `result` 'SINGLE_PRIMARY' | 'MULTIPLE_PRIMARIES' | 'QUESTIONABLE' | 'INVALID_INPUT'
  - `group_id` string
  - `group_name` string
  - `step` string
  - `reason` string
  - `applied_rules` MphRule[]
    - `step` string
    - `question` string
    - `reason` string
    - `notes` string[]
    - `examples` string[]

## Other responses

- `400`: Missing or invalid input

---

[API](https://skmtc.dev/cancer/apis/seer-api.md) - [All operations](https://skmtc.dev/cancer/apis/seer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cancer/apis/seer-api/revisions/f6634f7497ad?raw)
