omidb.classificationtools

omidb.classificationtools.filter_studies_by_event_type(client, event_type, exact_match=True)[source]

Remove studies (omidb.study.Study) from client whose event type includes one or all (if exact_match is True) of those listed by event_type.

Parameters
  • client (Client) – A classified client with more than one episode

  • event_type (List[Event]) – A list of event types

  • exact_match (bool) – If True the event types of a study must all of those in event_type.

Return type

Client

omidb.classificationtools.has_prior(client)[source]

Returns True if client has a non-malignant episode earlier than a malignant episode; False otherwise.

Parameters

client (Client) – A classified client with more than one episode

Return type

bool