-
Notifications
You must be signed in to change notification settings - Fork 663
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
Flexporter - Update randomCode fn to take output type as an optional second param #1527
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1527 +/- ##
==========================================
Coverage 77% 77%
- Complexity 3710 4005 +295
==========================================
Files 170 178 +8
Lines 24077 25169 +1092
Branches 3351 3591 +240
==========================================
+ Hits 18618 19485 +867
- Misses 4418 4557 +139
- Partials 1041 1127 +86 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Great new feature
Update: I'm converting this to draft and will add the ability to define custom value sets within a flexporter mapping. It's a little roundabout but it will allow for choosing from just a small set of codes rather than forcing the user to use a terminology service and real VS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This custom value set functionality is awesome! Tested out with our qpp qicore mapping file to split the MedicationDispense status ValueSet and it worked very easily!
Updates to address flexporter issues identified by @elsaperelli :
I realized the
randomCode
function was improperly named since technically it produces a Coding not a code. Rather than rename it and break backwards compatibility, this gives it an optional second parameter for "return type". This can be "code" to return a string, "Coding" to return a Coding (ie{system, code, display}
), or "CodeableConcept" to return a CodeableConcept. Default if unspecified is Coding, for backwards compatibility.Adds support for defining custom ValueSets in a flexporter mapping file, so that you can select a randomCode from your handpicked set of codes rather than having to use a terminology server and pre-existing VS. The syntax is a YAML version of the ValueSet resource, to minimize inventing new things. There are some quirks to this though so I'm open to suggestions here:
Map<String,Object>
, serializes that to JSON, then parses the JSON as FHIR. The alternative here would be to define a custom new model to represent a VS, or to re-implement the ValueSet class.Added some extra error handling for the value set $expand operation, to assist in debugging when it returns an OperationOutcome