im_add_evidence: Add evidence to a diagnosis request object

Description Usage Arguments Details Note Examples

View source: R/diagnosis.r

Description

Meant to be used in a "pipe" and will build the JSON array for POSTing to the Infermedica API automagically in the background. Chain multiple calls together to add additional evidence components.

Usage

1
im_add_evidence(diag_obj, id, choice = c("present", "absent", "unknown"))

Arguments

diag_obj

diagnosis request object started with im_start_dignosis().

id

a symptom

Details

TODO: Add support for observed_at, extras and evaluated_at

Note

The package expects INFERMEDICA_APP_ID and INFERMEDICA_API_KEY to be in the environment. The easiest way to do this is to add entries to ~/.Renviron and restart R.

Examples

1
2
3
4
im_start_diagnosis() %>%
  im_add_patient_info(29, "male") %>%
  im_add_evidence("s_21", "present") %>%
  im_get_diagnosis()

hrbrmstr/infermedica documentation built on May 3, 2019, 9:38 p.m.