(self, item, form, case_id)
return study_event
Return the current study event. Opens a new study event if necessary.
Return the current study event. Opens a new study event if necessary.
Return the current study event . Opens a new study event if necessary .
def get_study_event(self, item, form, case_id):
        """
        Return the current study event. Opens a new study event if necessary.
        """
        if len(self.data[item.study_event_oid]):
            study_event = self.data[item.study_event_oid][-1]
            if study_event.is_repeating and study_event.case_id != case_id:
                study_event = StudyEvent(self._domain_name, item.study_event_oid, case_id)
                self.data[item.study_event_oid].append(study_event)
        else:
            study_event = StudyEvent(self._domain_name, item.study_event_oid, case_id)
            self.data[item.study_event_oid].append(study_event)
        return study_event
def get_study_event ( self , item , form , case_id ) : if len ( self . data [ item . study_event_oid ] ) : study_event = self . data [ item . study_event_oid ] [ - 1 ] if study_event . is_repeating and study_event . case_id != case_id : study_event = StudyEvent ( self . _domain_name , item . study_event_oid , case_id ) self . data [ item . study_event_oid ] . append ( study_event ) else : study_event = StudyEvent ( self . _domain_name , item . study_event_oid , case_id ) self . data [ item . study_event_oid ] . append ( study_event ) return study_event