Skip to content
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

Feat/15 support in1 policy number #18

Merged
merged 2 commits into from
Sep 5, 2018

Conversation

NiklasMM
Copy link
Contributor

@NiklasMM NiklasMM commented Sep 5, 2018

First commit adds support for item assignments, so content can be assigned to segments using their index:

message.in1[10] = "foo"

This is useful when writing tests.

The second commit adds support for index override in cell definition. This means that when defining cells for a specific segments in hl7_segments.py, you don't have to write down all cells until you get to the one you're interested in.

Example:

segment_maps = {
    'FOO': [
        make_cell_type('bar'),
        make_cell_type('bar'),
        make_cell_type('bam', index=12),
   ]
}

Before this change, you'd have to write down all 12 cells.

Finally, the last commit uses this to define policy_number for IN1 segments.

  Hl7Segment now supports item assignment to directly
  fill a field at a certain index with a value.

  Refactors initialization to use item assignments.

  E.g: `segment[12] = "content"`
  Add support for index override in cell definition
  and add support for policy_number field in IN1 segments.

  Close #15
@NiklasMM NiklasMM force-pushed the feat/15_support-IN1-policy-number branch from 35f0ed5 to a90bf2e Compare September 5, 2018 13:15
@NiklasMM NiklasMM merged commit ee8c475 into master Sep 5, 2018
@NiklasMM NiklasMM deleted the feat/15_support-IN1-policy-number branch September 5, 2018 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants