Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

FI-964 fix bugs with _id search parameter and .where in search validation #482

Merged
merged 3 commits into from
Sep 8, 2020

Conversation

ghost
Copy link

@ghost ghost commented Aug 12, 2020

This PR addresses some bugs in the generic generator involving search parameters. One issue is that the search validation code used to have fhir path expressions that we couldn't handle. For example, the us core laboratory result sequence had the ".where" in the search validation code. This removes the ".where" part. The second is that the patient id parameter was being set to id instead of _id.

To test, run the generic generator on the us core resources. Check that the patient sequence's id search is _id instead id and that the ".where" is not included in the lab result sequence.

@ghost ghost changed the title fix bugs with _id search parameter and .where in search validation FI-964 fix bugs with _id search parameter and .where in search validation Aug 12, 2020
path.gsub(/.where\((.*)/, '')
end

def capitalize_first_letter(str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently discovered that ActiveSupport has an upcase_first method that we can use for this https://api.rubyonrails.org/v5.2.4/classes/String.html#method-i-upcase_first

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, ActiveSupport has everything, doesn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@radamson radamson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested these bug fixes for the tech forum demo and while generating some mcode tests.

@okeefm okeefm self-requested a review September 8, 2020 17:39
Copy link

@okeefm okeefm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Will merge when Travis finishes.

@okeefm okeefm merged commit d45c1f4 into development Sep 8, 2020
@okeefm okeefm deleted the fi-964-fix-generic-generator-search-bugs branch September 8, 2020 18:00
@radamson radamson mentioned this pull request Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants