Giter VIP home page Giter VIP logo

elixir-hl7's People

Contributors

bryanhunter avatar calvinb avatar camilleryr avatar darkmarmot avatar starbelly avatar thefunc5 avatar vikas15bhardwaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elixir-hl7's Issues

Documentation how to add Segments

There's a lot of info in the readme about parsing HL7 messages, but I'm trying to create them and I don't see a straightforward way to add segments to a message. A new message can be created with raw input, or with a header, but how do you add segments?

`HL7.Segment.get_part` has wrong typing

The typing has pos_integer, but in reality we allow 0 for the field.

Since HL7 is 1 based I don't know if we should change the code to be 1 based or if the typing should be updated.

removing components/subcomponents of a field

    hl7
    |> HL7.Query.replace_parts("MSH-9.3", nil)
    |> HL7.Query.to_message()

Is valid and removed the part, but the types don't line up and there is no test. I think this is valid and we should document the support.

Since the types don't line up if people are using dialyzer they get warnings.

Implement enumerable protocol

Would it be possible to implement the Enumerable Protocol for the HL7.Query Struct, so that Enum.map and HL7.Query.map would be equivalent?

Docs missing encoding example

If the library is capable of doing encoding?, an example and/or test for encoding a message starting from a filled in struct (like MSH) would be very helpful.

Query.get_part can return nil while dialyzer says it can't

I'm not sure if this is the right place to report this, but since I don't know much about macros and the HL7.Query changes seem to have triggered this, I'll report it here first.

For example, if we do a query on a non-existent TXA-16 field and check if the result is nil, dialyzer scolds us that a binary cannot be nil, while at runtime nil is returned.

defmodule Test do
  require HL7.Query
  import HL7.Query, only: [sigil_g: 2]
  # Will return :was_nil
  def test do
    msg = HL7.Query.new(HL7.Examples.wikipedia_sample_hl7())

    part = HL7.Query.get_part(msg, ~g"TXA-16")

    if is_nil(part) do
      :was_nil
    else
      :not_nil
    end
  end
end

Dialyzer Output:

lib/test.ex:11:exact_eq
The test binary() == nil can never evaluate to 'true'.
``

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.