aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D96A/Segments/PIA.hs
blob: 95d98133c7e64b92daeaee7652b45661a83f697a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{-# LANGUAGE OverloadedStrings #-}

---- Machine generated code.
---- Output of edi-parser-scaffolder

module Text.Edifact.D96A.Segments.PIA
  ( -- * Definition
    segmentPIA
    -- * Dependencies
  , compositeC212
  , simple4347
  ) where

import           Text.Edifact.D96A.Composites (compositeC212)
import           Text.Edifact.D96A.Simples    (simple4347)

import           Text.Edifact.Parsing
import           Text.Edifact.Types           (Value)

-- | Derived from this specification:
--
-- >       PIA    ADDITIONAL PRODUCT ID
-- >
-- >       Function: To specify additional or substitutional item
-- >                 identification codes.
-- >
-- > 010   4347  PRODUCT ID. FUNCTION QUALIFIER                 M  an..3
-- >
-- > 020   C212  ITEM NUMBER IDENTIFICATION                     M
-- >       7140   Item number                                   C  an..35
-- >       7143   Item number type, coded                       C  an..3
-- >       1131   Code list qualifier                           C  an..3
-- >       3055   Code list responsible agency, coded           C  an..3
-- >
-- > 030   C212  ITEM NUMBER IDENTIFICATION                     C
-- >       7140   Item number                                   C  an..35
-- >       7143   Item number type, coded                       C  an..3
-- >       1131   Code list qualifier                           C  an..3
-- >       3055   Code list responsible agency, coded           C  an..3
-- >
-- > 040   C212  ITEM NUMBER IDENTIFICATION                     C
-- >       7140   Item number                                   C  an..35
-- >       7143   Item number type, coded                       C  an..3
-- >       1131   Code list qualifier                           C  an..3
-- >       3055   Code list responsible agency, coded           C  an..3
-- >
-- > 050   C212  ITEM NUMBER IDENTIFICATION                     C
-- >       7140   Item number                                   C  an..35
-- >       7143   Item number type, coded                       C  an..3
-- >       1131   Code list qualifier                           C  an..3
-- >       3055   Code list responsible agency, coded           C  an..3
-- >
-- > 060   C212  ITEM NUMBER IDENTIFICATION                     C
-- >       7140   Item number                                   C  an..35
-- >       7143   Item number type, coded                       C  an..3
-- >       1131   Code list qualifier                           C  an..3
-- >       3055   Code list responsible agency, coded           C  an..3
--
-- Dependencies: 'compositeC212', 'simple4347'.
segmentPIA :: Parser Value
segmentPIA =
  segment "PIA"
    [ "010" .@ mandatory simple4347
    , "020" .@ mandatory compositeC212
    , "030" .@ optional  compositeC212
    , "040" .@ optional  compositeC212
    , "050" .@ optional  compositeC212
    , "060" .@ optional  compositeC212
    ]