Skip to content

Instantly share code, notes, and snippets.

@mmcdermott
Last active August 16, 2024 16:50
Show Gist options
  • Save mmcdermott/80a9086d8fdf36f2fd04b8e4912348ac to your computer and use it in GitHub Desktop.
Save mmcdermott/80a9086d8fdf36f2fd04b8e4912348ac to your computer and use it in GitHub Desktop.
predicates:
hospital_admission:
code: {regex: "HOSPITAL_ADMISSION//.*"}
hospital_discharge:
code: {regex: "HOSPITAL_DISCHARGE//.*"}
death:
code: MEDS_DEATH
discharge_or_death:
expr: or(hospital_discharge, death)
trigger: hospital_admission
windows:
input:
start: NULL
end: trigger + 48h
start_inclusive: True
end_inclusive: True
index_timestamp: end
gap:
start: input.end
end: start + 24h
start_inclusive: False
end_inclusive: True
has:
hospital_admission: (None, 0)
discharge_or_death: (None, 0)
target:
start: trigger
end: start + 3d
start_inclusive: False
end_inclusive: True
label: discharge_or_death
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment