Adding empty? Predicate to HL7 API#83
Adding empty? Predicate to HL7 API#83Chase-Callahan wants to merge 1 commit intoHCA-Healthcare:mainfrom
empty? Predicate to HL7 API#83Conversation
b24a3bd to
2c107cf
Compare
|
Hey @DarkMarmot, was wondering if you might be able to take a look at this if you get a chance? |
|
|
||
| ## Examples | ||
|
|
||
| iex> hl7 = HL7.Examples.wikipedia_sample_hl7() |> new!() |
There was a problem hiding this comment.
Do you not have to import HL7 here for the sigil? Otherwise, looks good!
There was a problem hiding this comment.
Not if you change the doctest macro to doctest HL7, import: true! Matt showed me that one the other day :).
If you think it makes the example more difficult to follow, then I am happy to add it back
There was a problem hiding this comment.
@Chase-Callahan oh that's a great trick! I wonder if we should show the import for the first example in a series (so people realize it was needed0, and then drop it for the rest since we could with that macro?
There was a problem hiding this comment.
This is a good point @DarkMarmot, perhaps it is better to stick with convention in this module. I have updated examples to use import!
2c107cf to
f64a0a9
Compare
There are often times when consumers need to know whether the path they are selecting from the HL7 contains data. This concept of the data returned being "empty" is currently undefinded in the HL7 library and is left up to interpretation of the users. This provides an implementaiton for determining if a given path is empty of data or not.
f64a0a9 to
b13a4ef
Compare
|
@DarkMarmot, we have found that having this same function availible but as a 1 arity function that takes a value in directly is also useful. I opened a PR to this PR if you like the idea and want to merge it. If not, happy to carryout a discussion there. Didn't want to hold up this PR though :) |
Resolves #76
There are often times when consumers need to know whether the path they are selecting from the HL7 contains data. This concept of the data returned being "empty" is currently undefinded in the HL7 library and is left up to interpretation of the users.
This provides an implementaiton for determining if a given path is empty of data or not.
Testing Instructions
iex -S mix