Skip to content

Commit a84aa16

Browse files
Package of improvements, including updates to GS1 parser to support new AIs, including the new Italian NHRN. Also, improvement to the Calibration code to better analyse FOrmat 05/06 barcodes, including support for ASCII 04 and seperate handling of individual EDI separator characters.
1 parent 2d0124e commit a84aa16

8 files changed

Lines changed: 3604 additions & 2149 deletions

File tree

Solidsoft.Reply.Parsers.Gs1Ai.Tests/Features/ParseEntity.feature

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ Scenario: Parse CONTENT
3838
And the length of the value should be fixed
3939
And there should be no errors
4040

41+
@N2+N14
42+
Scenario: Parse MTO GTIN
43+
Given the input is 0312345678901231
44+
When the input to submitted to the parser
45+
Then the entity should be 03
46+
And the AI should be 03
47+
And the value should be 12345678901231
48+
And the data value should be MTO GTIN
49+
And the description should be Identification of a Made-to-Order (MtO) trade item (GTIN)
50+
And the length of the value should be fixed
51+
And there should be no errors
52+
4153
@N2+X..20
4254
Scenario: Parse BATCH/LOT
4355
Given the input is 10ABC123D
@@ -1936,6 +1948,18 @@ Scenario: Parse UIC+EXT
19361948
And the length of the value should be fixed
19371949
And there should be no errors
19381950

1951+
@N4+N1..X4
1952+
Scenario: Parse UFRGT UNIT TYPE
1953+
Given the input is 70411A
1954+
When the input to submitted to the parser
1955+
Then the entity should be 7041
1956+
And the AI should be 7041
1957+
And the value should be 1A
1958+
And the data value should be UFRGT UNIT TYPE
1959+
And the description should be UN/CEFACT freight unit type
1960+
And the length of the value should be variable
1961+
And there should be no errors
1962+
19391963
@N3+X..20
19401964
Scenario: Parse NHRN PZN
19411965
Given the input is 7103675419
@@ -2008,6 +2032,18 @@ Scenario: Parse NHRN NDC
20082032
And the length of the value should be variable
20092033
And there should be no errors
20102034

2035+
@N3+X..20
2036+
Scenario: Parse NHRN AIC
2037+
Given the input is 716A012345676
2038+
When the input to submitted to the parser
2039+
Then the entity should be 716
2040+
And the AI should be 716
2041+
And the value should be A012345676
2042+
And the data value should be NHRN AIC
2043+
And the description should be National Healthcare Reimbursement Number (NHRN) – Italy AIC
2044+
And the length of the value should be variable
2045+
And there should be no errors
2046+
20112047
@N4+X2+X..28
20122048
Scenario: Parse CERT # s
20132049
Given the input is 7230EMBABT-MED00108
@@ -2033,6 +2069,126 @@ Scenario: Parse PROTOCOL
20332069
And the length of the value should be variable
20342070
And there should be no errors
20352071

2072+
@N4+N8
2073+
Scenario: Parse DOB
2074+
Given the input is 725020240214
2075+
When the input to submitted to the parser
2076+
Then the entity should be 7250
2077+
And the AI should be 7250
2078+
And the value should be 20240214
2079+
And the data value should be DOB
2080+
And the description should be Date of birth
2081+
And the length of the value should be fixed
2082+
And there should be no errors
2083+
2084+
@N4+N12
2085+
Scenario: Parse DOB TIME
2086+
Given the input is 7251202402141743
2087+
When the input to submitted to the parser
2088+
Then the entity should be 7251
2089+
And the AI should be 7251
2090+
And the value should be 202402141743
2091+
And the data value should be DOB TIME
2092+
And the description should be Date and time of birth
2093+
And the length of the value should be fixed
2094+
And there should be no errors
2095+
2096+
@N4+N1
2097+
Scenario: Parse BIO SEX
2098+
Given the input is 72521
2099+
When the input to submitted to the parser
2100+
Then the entity should be 7252
2101+
And the AI should be 7252
2102+
And the value should be 1
2103+
And the data value should be BIO SEX
2104+
And the description should be Biological sex
2105+
And the length of the value should be fixed
2106+
And there should be no errors
2107+
2108+
@N4+X..40
2109+
Scenario: Parse FAMILY NAME
2110+
Given the input is 7253Doe
2111+
When the input to submitted to the parser
2112+
Then the entity should be 7253
2113+
And the AI should be 7253
2114+
And the value should be Doe
2115+
And the data value should be FAMILY NAME
2116+
And the description should be Family name of person
2117+
And the length of the value should be variable
2118+
And there should be no errors
2119+
2120+
@N4+X..40
2121+
Scenario: Parse GIVEN NAME
2122+
Given the input is 7254John
2123+
When the input to submitted to the parser
2124+
Then the entity should be 7254
2125+
And the AI should be 7254
2126+
And the value should be John
2127+
And the data value should be GIVEN NAME
2128+
And the description should be Given name of person
2129+
And the length of the value should be variable
2130+
And there should be no errors
2131+
2132+
@N4+X..10
2133+
Scenario: Parse SUFFIX
2134+
Given the input is 7255Junior
2135+
When the input to submitted to the parser
2136+
Then the entity should be 7255
2137+
And the AI should be 7255
2138+
And the value should be Junior
2139+
And the data value should be SUFFIX
2140+
And the description should be Name suffix of person
2141+
And the length of the value should be variable
2142+
And there should be no errors
2143+
2144+
@N4+X..90
2145+
Scenario: Parse FULL NAME
2146+
Given the input is 7256Doe,John,Junior
2147+
When the input to submitted to the parser
2148+
Then the entity should be 7256
2149+
And the AI should be 7256
2150+
And the value should be Doe,John,Junior
2151+
And the data value should be FULL NAME
2152+
And the description should be Full name of person
2153+
And the length of the value should be variable
2154+
And there should be no errors
2155+
2156+
@N4+X..70
2157+
Scenario: Parse PERSON ADDR
2158+
Given the input is 7257123+Main+St,+Anytown,+Anyregion,+12345
2159+
When the input to submitted to the parser
2160+
Then the entity should be 7257
2161+
And the AI should be 7257
2162+
And the value should be 123+Main+St,+Anytown,+Anyregion,+12345
2163+
And the data value should be PERSON ADDR
2164+
And the description should be Address of person
2165+
And the length of the value should be variable
2166+
And there should be no errors
2167+
2168+
@N4+N1+X1+N1
2169+
Scenario: Parse BIRTH SEQUENCE
2170+
Given the input is 72582/3
2171+
When the input to submitted to the parser
2172+
Then the entity should be 7258
2173+
And the AI should be 7258
2174+
And the value should be 2/3
2175+
And the data value should be BIRTH SEQUENCE
2176+
And the description should be Baby birth sequence indicator
2177+
And the length of the value should be fixed
2178+
And there should be no errors
2179+
2180+
@N4+X..40
2181+
Scenario: Parse BABY
2182+
Given the input is 7259Alice+Betty
2183+
When the input to submitted to the parser
2184+
Then the entity should be 7259
2185+
And the AI should be 7259
2186+
And the value should be Alice+Betty
2187+
And the data value should be BABY
2188+
And the description should be Baby of family name
2189+
And the length of the value should be variable
2190+
And there should be no errors
2191+
20362192
@N4+N2
20372193
Scenario: Parse AIDC MEDIA TYPE
20382194
Given the input is 724105
@@ -2213,6 +2369,18 @@ Scenario: Parse GMN
22132369
And the length of the value should be variable
22142370
And there should be no errors
22152371

2372+
@N4+X..25
2373+
Scenario: Parse MUDI
2374+
Given the input is 80141987654Ad4X4bL5ttr2310c2K
2375+
When the input to submitted to the parser
2376+
Then the entity should be 8014
2377+
And the AI should be 8014
2378+
And the value should be 1987654Ad4X4bL5ttr2310c2K
2379+
And the data value should be MUDI
2380+
And the description should be Highly Individualised Device Registration Identifier (HIDRI)
2381+
And the length of the value should be variable
2382+
And there should be no errors
2383+
22162384
@N4+N18
22172385
Scenario: Parse GSRN - PROVIDER
22182386
Given the input is 8017506091751000315180

0 commit comments

Comments
 (0)