Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note on identifying visit types [todo] #20

Open
Miking98 opened this issue Oct 29, 2024 · 0 comments
Open

Note on identifying visit types [todo] #20

Miking98 opened this issue Oct 29, 2024 · 0 comments

Comments

@Miking98
Copy link
Collaborator

For determining which rows are ICU/ED/etc., the best way is to do the following:

  1. Load the FEMR database of patients via: femr_db = femr.datasets.PatientDatabase("../EHRSHOT_ASSETS/femr/extract")
  2. Retrieve a specific patient via: patient = femr_db[patient_id]
  3. Retrieve all the ICU events for this patient via: femr.get_icu_events(patient, ontology) to get the list of ICU events for a specific patient
  4. Loop through every event for this patient (i.e. for event in femr_db[patient_id].events). Every event that falls within the (start, end) of an ICU event can be considered to have occurred within an ICU event.

TODO -- confirm this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant