Repository: mps-gmbh/hl7-parser (language: python)

Issue:
feat(segment): Add insured's address to IN1 segment
Adds the *insured's address* as a `HL7_ExtendedAddress` to IN1 segment. 
Wrong index for IN1 cell `policy_number`
Introduced by #26 

The index for IN1 cell `policy_number` had unfortunately been changed from 35 to 36. Correct is 35. 


Discussion / hints:

Fix patch:
diff --git a/hl7parser/hl7_segments.py b/hl7parser/hl7_segments.py
index 096da68..7effa36 100644
--- a/hl7parser/hl7_segments.py
+++ b/hl7parser/hl7_segments.py
@@ -251,7 +251,7 @@
             "insureds_address",
             options={"type": HL7_ExtendedAddress, "required": False, "repeats": False},
         ),
-        make_cell_type("policy_number", index=36)
+        make_cell_type("policy_number", index=35)
         # NOTE: standard defines more fields which can be added if needed in
         # the future
     ],


Test patch:
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 8b285fb..e0ae193 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -288,7 +288,7 @@ def test_in1_segment():
         "IN1|1:1|McDH|123456789^^^^^^^^^McDonalds Health|McDonalds Health||||||"
         "||||||Musterfrau^Gertrud^^^^Dr.^L^A^|SEL|19700101|Königstr. 1B^^Stuttgart^^70173|"
         "||||||||||"
-        "||||||1|12345|||||||||||||"
+        "|||||1|12345||||||||||||||"
     )
 
     in1 = HL7Segment(message_data)
@@ -302,9 +302,9 @@ def test_in1_segment():
     assert str(name_of_insured) == "Musterfrau^Gertrud^^^^Dr.^L^A^"
     assert str(name_of_insured.family_name) == "Musterfrau"
     assert str(name_of_insured.given_name) == "Gertrud"
-    assert str(name_of_insured.middle_name) == ''
-    assert str(name_of_insured.suffix) == ''
-    assert str(name_of_insured.prefix) == ''
+    assert str(name_of_insured.middle_name) == ""
+    assert str(name_of_insured.suffix) == ""
+    assert str(name_of_insured.prefix) == ""
     assert str(name_of_insured.degree) == "Dr."
     assert str(name_of_insured.name_type_code) == "L"
     assert str(name_of_insured.name_representation_code) == "A"