omidb.episode

class omidb.episode.Episode(id: str, events: omidb.events.Events, studies: Optional[List[omidb.study.Study]] = None, type: Optional[omidb.episode.Type] = None, action: Optional[omidb.episode.Action] = None, opened_date: Optional[datetime.date] = None, closed_date: Optional[datetime.date] = None, is_closed: Optional[bool] = None, lesions: Optional[List[omidb.lesion.Lesion]] = None)[source]

An episode contains a set of medical procedures or events associated with the treatment or diagnosis of a clinical condition. Medical imaging studies are included with each episode, and are typically (but not always) linked to one or more events.

Parameters
  • id (str) – NBSS episode identifier, only unique within client

  • events (Events) – A set of medical procedures associated with the episode

  • studies (Optional[List[Study]]) – List of omidb.study.Study s where collections of screening and diagnostic images reside

  • type (Optional[Type]) – Enumeration defining the type of episode

  • action (Optional[Action]) – Enumeration defining the action outcome of the episode

  • opened_date (Optional[date]) – Date that the episode opened

  • closed_date (Optional[date]) – Date that the episode closed

  • is_closed (Optional[bool]) – boolean signifying whether the episode is closed

  • lesions (Optional[List[Lesion]]) – A list of omidb.lesion.Lesion s, examined in the episode

property has_benign_opinions

Returns True if the container e.events contains a omidb.events.Events.surgery or omidb.events.Events.biopsy_wide event where the left or right opinion is benign (omidb.events.SideOpinion.OB)

Return type

bool

property has_malignant_opinions

Returns True if the container e.events contains a omidb.events.Events.surgery or omidb.events.Events.biopsy_wide event where the left or right opinion is malignant (omidb.events.SideOpinion.OM)

Return type

bool

class omidb.episode.Type[source]

Type of episode

CA = 'Continued Assessment'
CD = 'Delayed Treatment'
CF = 'Follow-up after treatment'
CI = 'Interval case'
CR = 'Local Recurrence'
F = 'First Call'
G = 'GP Referral'
H = 'Higher Risk'
N = 'Non-rout Recall'
R = 'Routine Recall'
S = 'Self Referral'
X = 'Other'
class omidb.episode.Action[source]

Episode action

EC = 'Early Recall for Clinic'
ES = 'Early Recall for Screening'
FN = 'Fine Needle Aspiration'
FP = 'Follow-up (Post-treatment)'
FV = 'Further X-ray views'
IP = 'Inpatient biopsy'
MT = 'Medical Treatment'
NA = 'No Action from this procedure'
R2 = 'Routine second film opinion (obsolete)'
RC = 'Review in clinic'
RF = 'Referral to consultant/GP'
RR = 'Routine recall for screening'
ST = 'Surgical Treatment'
TR = 'Repeat Film (technical)'
WB = 'Wide Bore Needle'