-
Notifications
You must be signed in to change notification settings - Fork 1
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
Genericize checkIfSomeElementWithPropertyExists to show more available data + add formatCoding #302
Open
m-goggins
wants to merge
15
commits into
main
Choose a base branch
from
marcelle/add-encounter-class
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m-goggins
changed the title
Update Check for Elements to display more data + genericize
Genericize checkIfSomeElementWithPropertyExists to show more available data + add formatCoding
Jan 17, 2025
m-goggins
requested review from
robertandremitchell,
fzhao99,
nickclyde and
katyasoup
January 17, 2025 23:14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PULL REQUEST
Summary
This PR addresses a couple of bugs I found in the code while trying to chase down
classType
code handling that came up during Connectathon refactoring.First, I removed the
classTypecodes
from queries, as we were never including any codes because no codes are included in the VSAC. The intent behindclassTypecodes
was to allow users to look up encounters by class type, e.g., for a Chlamydia query, give me all of the encounters that are classified as "Emergency room" visits. I think in practice this is not an ideal way to scope queries because the emergency room visits could be completely unrelated to the chlamydia case; you could end up repeating the sins of eCR by overloading users with too much extraneous information. However, I do believe users have expressed interest in seeing the encounter class type for the results that we do return by snomed/loinc codes, which brings us to the second update.Second, I added
formatCoding
so that we would be able to correctly display classTypes if they are present in a bundle. We had previously been trying to process them as CodeableConcepts but they are Codings!Third, I fixed a bug in
checkIfSomeElementWithPropertyExists
that would always returnfalse
even if an element was present in a resource. I also updated this function to check for multiple properties at once so that for Encounters we could check forclass
,serviceProvider
, andserviceType
in one go instead of looping over the encounters (and other resource types) multiple times.What we used to display (no clinic type even though it existed in the data and we checked for it 🙈):
What we display now (clinic type is now visible!):
Related Issue
Fixes #300
Additional Information
We also now display the Reason Code in Medication Requests if they exist.
Old:
Anything else the review team should know?
Checklist