Provides an interface for the DORIS https://icd.who.int/doris system by the World Health Organization. Obtains the underlying cause of death using the rules of the Doris system. The fields provided are fields of a standard death certificate.
Usage
doris(
token,
sex = NULL,
age = NULL,
date_of_birth = NULL,
date_of_death = NULL,
cause_of_death_code_a = NULL,
cause_of_death_code_b = NULL,
cause_of_death_code_c = NULL,
cause_of_death_code_d = NULL,
cause_of_death_code_e = NULL,
cause_of_death_uri_a = NULL,
cause_of_death_uri_b = NULL,
cause_of_death_uri_c = NULL,
cause_of_death_uri_d = NULL,
cause_of_death_uri_e = NULL,
cause_of_death_code_part2 = NULL,
cause_of_death_uri_part2 = NULL,
interval_a = NULL,
interval_b = NULL,
interval_c = NULL,
interval_d = NULL,
interval_e = NULL,
surgery_was_performed = NULL,
surgery_date = NULL,
surgery_reason = NULL,
autopsy_was_requested = NULL,
autopsy_findings = NULL,
manner_of_death = NULL,
manner_of_death_date_of_external_cause_or_poisoning = NULL,
manner_of_death_description_external_cause = NULL,
manner_of_death_place_of_occurrence_external_cause = NULL,
fetal_or_infant_death_multiple_pregnancy = NULL,
fetal_or_infant_death_stillborn = NULL,
fetal_or_infant_death_within_24h = NULL,
fetal_or_infant_death_birth_weight = NULL,
fetal_or_infant_death_pregnancy_weeks = NULL,
fetal_or_infant_death_age_mother = NULL,
fetal_or_infant_death_perinatal_description = NULL,
maternal_death_was_pregnant = NULL,
maternal_death_time_from_pregnancy = NULL,
maternal_death_pregnancy_contribute = NULL,
release = "2024-01",
language = "en",
stop_on_error = FALSE,
auto_update = TRUE
)
Arguments
- token
(
list
) Access token to the API obtained fromget_token()
- sex
Can be either numeric (
1
forMale
,2
forFemale
and9
forUnknown
) or can be a character with those words.- age
Estimated age of the individual in ISO-8601 format. Use
iso_8601()
to create the age in the appropriate format.- date_of_birth
Date of birth of the individual (date or datetime object)
- date_of_death
Date of death of the individual (date or datetime object)
- cause_of_death_code_a
String. Cause field A classification codes, comma separated.
- cause_of_death_code_b
String. Cause field B classification codes, comma separated.
- cause_of_death_code_c
String. Cause field C classification codes, comma separated.
- cause_of_death_code_d
String. Cause field D classification codes, comma separated.
- cause_of_death_code_e
String. Cause field E classification codes, comma separated.
- cause_of_death_uri_a
String. Cause field A classification URIs, comma separated.
- cause_of_death_uri_b
String. Cause field B classification URIs, comma separated.
- cause_of_death_uri_c
String. Cause field C classification URIs, comma separated.
- cause_of_death_uri_d
String. Cause field D classification URIs, comma separated.
- cause_of_death_uri_e
String. Cause field E classification URIs, comma separated.
- cause_of_death_code_part2
String. Cause field Part2 classification codes, comma separated.
- cause_of_death_uri_part2
String. Cause field Part2 classification URIs, comma separated.
- interval_a
Time interval from onset to death for Field A, in ISO 8601 format. Use
iso_8601()
to construct that duration.- interval_b
Time interval from onset to death for Field B, in ISO 8601 format. Use
iso_8601()
to construct that duration.- interval_c
Time interval from onset to death for Field C, in ISO 8601 format. Use
iso_8601()
to construct that duration.- interval_d
Time interval from onset to death for Field D, in ISO 8601 format. Use
iso_8601()
to construct that duration.- interval_e
Time interval from onset to death for Field E, in ISO 8601 format. Use
iso_8601()
to construct that duration.- surgery_was_performed
Whether surgery was performed on the individual (
0
orNo
,1
orYes
, and9
orUnknown
)- surgery_date
Date of surgery on the individual if
surgery_was_performed
- surgery_reason
String. Reason for surgery.
- autopsy_was_requested
Whether an autposy was performed on the individual (
0
orNo
,1
orYes
, and9
orUnknown
)- autopsy_findings
Whether findings from the autopsy were used in the certification (
0
orNo
,1
orYes
, and9
orUnknown
).- manner_of_death
Either code or word: 0: Disease, 1: Accident, 2: Intentional self-harm, 3: Assault, 4: Legal intervention, 5: War, 6: Could not be determined, 7: Pending investigation, 9: Unknown.
- manner_of_death_date_of_external_cause_or_poisoning
Date of external cause or poisoning of the individual according to
manner_of_death
- manner_of_death_description_external_cause
String. Description of external cause.
- manner_of_death_place_of_occurrence_external_cause
Integer. 0: At home, 1: Residential institution, 2: School, other institution, public administration area, 3: Sports and athletics area, 4: Street and highway, 5: Trade and service area, 6: Industrial and construction area, 7: Farm, 8: Other place, 9: Unknown.
- fetal_or_infant_death_multiple_pregnancy
(
0
orNo
,1
orYes
, and9
orUnknown
)- fetal_or_infant_death_stillborn
(
0
orNo
,1
orYes
, and9
orUnknown
)- fetal_or_infant_death_within_24h
Hours survived if death occurred within 24 hours.
- fetal_or_infant_death_birth_weight
Birth weight in grams.
- fetal_or_infant_death_pregnancy_weeks
Integer. Number of completed weeks of pregnancy.
- fetal_or_infant_death_age_mother
Integer. Age of mother in years.
- fetal_or_infant_death_perinatal_description
String. Condition of mother affecting the fetus and newborn.
- maternal_death_was_pregnant
For women, was the deceased pregnant? (
0
orNo
,1
orYes
, and9
orUnknown
)- maternal_death_time_from_pregnancy
Integer. 0: At time of death, 1: Within 42 days before death, 2: Between 43 days and 1 year before death, 3: One year or more before death, 9: Unknown.
- maternal_death_pregnancy_contribute
Did pregnancy contribute to death? (
0
orNo
,1
orYes
, and9
orUnknown
)- release
Release version as listed in https://icd.who.int/docs/icd-api/SupportedClassifications/#supported-classifications-and-versions the default is
2024-01
.- language
(
character
) Language for the request. Available languages are listed in https://icd.who.int/docs/icd-api/SupportedClassifications/ the default is English (language = "en"
).- stop_on_error
Whether to stop if API throws an error or just throw it as a warning.
- auto_update
Attempts to update token automatically
Note
IMPORTANT!. This endpoint is pre-release. The results may have issues and the API may change in the next releases. Underlying cause of death detection using the rules of the Doris system (https://icd.who.int/doris) The fields provided are fields of a standard death certificate. You don't need to provide causeOfDeathUri fields if you provide causeOfDeathCode fields or vice versa
Examples
# Assuming that the CLIENT ID and CLIENT SECRET are set up. Substitute accordingly
if (exists("CLIENT_ID") & exists("CLIENT_SECRET")) {
# Get the Token
token <- get_token(CLIENT_ID, CLIENT_SECRET)
# Check a 25 year old male with immediate cause 1C8Z
# due to 1C62.3Z
doris(token,
sex = "Male", age = iso_8601(years = 25), cause_of_death_code_a = "1C8Z",
cause_of_death_code_b = "1C62.3Z"
)
# Check a 52 year old with immediate cause "GB61.Z" due to GB60.Z
# due to 5A11 due to BA00.Z with other significant issues contributing to death
# being 3A9Z and BC45
doris(token,
sex = "Male", age = iso_8601(years = 25), cause_of_death_code_a = "GB61.Z",
cause_of_death_code_b = "GB60.Z", cause_of_death_code_c = "5A11",
cause_of_death_code_d = "BA00.Z", cause_of_death_code_part2 = c("3A9Z", "BC45")
)
}
#> $`Underlying cause of death (UCOD)`
#> [1] "5A11"
#>
#> $`UCOD URI`
#> [1] "http://id.who.int/icd/entity/119724091"
#>
#> $`UCOD with postcoordinated information (if available)`
#> [1] "5A11/BA00.Z"
#>
#> $`UCOD postcoordinated URI`
#> [1] "http://id.who.int/icd/release/11/mms/119724091 / http://id.who.int/icd/release/11/mms/761947693/unspecified"
#>
#> $`Detailed explanation (report)`
#> [1] "SP4: 5A11 is the starting point of the first-mentioned sequence (GB61.Z due to GB60.Z due to 5A11), which is selected as the tentative starting point (TSP).\nGB61.Z, GB60.Z, BA00.Z, BC45 is a manifestation of the selected underlying cause of death 5A11/BA00.Z and it is added as a postcoordination.\n\n\nFull report:\nSP1: is not applicable.\nSP2: is not applicable.\nSP3: is not applicable.\nSP4: 5A11 is the starting point of the first-mentioned sequence (GB61.Z due to GB60.Z due to 5A11), which is selected as the tentative starting point (TSP).\nSP6: is not applicable.\nSP7: is not applicable.\nSP8: is not applicable.\nM1: There is no special instruction applicable with TUC 5A11.\nM2: is not applicable.\nM3: The tentative underlying cause is the same as the starting point selected in Steps SP1 to SP8.\nGB61.Z, GB60.Z, BA00.Z, BC45 is a manifestation of the selected underlying cause of death 5A11/BA00.Z and it is added as a postcoordination.\n"
#>
#> $reject
#> [1] FALSE
#>
#> $error
#> NULL
#>
#> $warning
#> NULL
#>