aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/src/Text/Edifact/Common/Segments/UNH.hs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Text/Edifact/Common/Segments/UNH.hs')
-rw-r--r--core/src/Text/Edifact/Common/Segments/UNH.hs44
1 files changed, 44 insertions, 0 deletions
diff --git a/core/src/Text/Edifact/Common/Segments/UNH.hs b/core/src/Text/Edifact/Common/Segments/UNH.hs
new file mode 100644
index 0000000..61cb6b3
--- /dev/null
+++ b/core/src/Text/Edifact/Common/Segments/UNH.hs
@@ -0,0 +1,44 @@
1{-# LANGUAGE OverloadedStrings #-}
2
3module Text.Edifact.Common.Segments.UNH
4 ( segmentUNH
5 ) where
6
7import Text.Edifact.Common.Composites (compositeS009, compositeS010)
8import Text.Edifact.Common.Simples (simple0062, simple0068)
9
10import Text.Edifact.Parsing
11import Text.Edifact.Types (Value)
12
13-- | Derived from this specification:
14--
15-- > Change indicators
16-- >
17-- > UNH MESSAGE HEADER
18-- >
19-- > Function: To head, identify and specify a message.
20-- >
21-- > 010 0062 MESSAGE REFERENCE NUMBER M an..14
22-- >
23-- > 020 S009 MESSAGE IDENTIFIER M
24-- > 0065 Message type M an..6
25-- > 0052 Message version number M an..3
26-- > 0054 Message release number M an..3
27-- > 0051 Controlling agency M an..2
28-- > 0057 Association assigned code C an..6
29-- >
30-- > 030 0068 COMMON ACCESS REFERENCE C an..35
31-- >
32-- > 040 S010 STATUS OF THE TRANSFER C
33-- > 0070 Sequence of transfers M n..2
34-- > 0073 First and last transfer C a1
35--
36-- Dependencies: 'compositeS009', 'compositeS010', 'simple0062', 'simple0068'.
37segmentUNH :: Parser Value
38segmentUNH =
39 segment "UNH"
40 [ "010" .@ mandatory simple0062
41 , "020" .@ mandatory compositeS009
42 , "030" .@ optional simple0068
43 , "040" .@ optional compositeS010
44 ]