Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #167 from seattleflu/childcare-add-event
Browse files Browse the repository at this point in the history
Accommodate unscheduled event in childcare ETL
  • Loading branch information
Chris Craft committed Nov 20, 2020
2 parents 9112c52 + 8199577 commit a4d320d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/seattleflu/id3c/cli/command/etl/redcap_det_childcare.py
Expand Up @@ -54,6 +54,7 @@ class StudyArm(Enum):

ENROLLMENT_EVENT_NAME_PREFIX = 'enrollment_arm_'
ENCOUNTER_EVENT_NAME_PREFIX = 'week'
UNSCHEDULED_ENCOUNTER_EVENT_NAME = 'unscheduled_arm_1'
COLLECTION_CODE = CollectionCode.HOME_HEALTH


Expand Down Expand Up @@ -154,7 +155,8 @@ def redcap_det_childcare(*, db: DatabaseSession, cache: TTLCache, det: dict,

if redcap_record_instance.event_name.startswith(ENROLLMENT_EVENT_NAME_PREFIX):
event_type = EventType.ENROLLMENT
elif redcap_record_instance.event_name.startswith(ENCOUNTER_EVENT_NAME_PREFIX):
elif redcap_record_instance.event_name.startswith(ENCOUNTER_EVENT_NAME_PREFIX) \
or redcap_record_instance.event_name == UNSCHEDULED_ENCOUNTER_EVENT_NAME:
event_type = EventType.ENCOUNTER
else:
LOG.error(f'The record instance has an unexpected event name: {redcap_record_instance.event_name}')
Expand Down

0 comments on commit a4d320d

Please sign in to comment.