hl7v2-types 0.0.0

Generated HL7 v2 message structure trees, segment field tables, data type components and message definitions
Documentation
// @generated by fhir-codegen from HL7/v2ig 3adcdbfff654ccbff5cd33aa34bd909a087e8e19 input/sourceOfTruth. DO NOT EDIT.
// Change the emitter (tools/fhir-codegen) and regenerate.
// SPDX-FileCopyrightText: Vernum Projecten B.V.
// SPDX-License-Identifier: Apache-2.0
//! The `EHC_E20` message structure.

use crate::model::{
    Cardinality, Group, GroupKind, Max, Node, SegmentRef, SegmentStatus, Structure,
};
use crate::segment;

/// The top-level nodes of [`EHC_E20`], one `static` so a structure with the same tree links to it.
pub static EHC_E20_NODES: [Node; 4] = [
    Node::Segment(SegmentRef {
        id: "EHC_E20.1-MSH",
        position: 1,
        segment: &segment::msh::MSH,
        cardinality: Cardinality {
            min: 1,
            max: Max::Bounded(1),
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "EHC_E20.2-SFT",
        position: 2,
        segment: &segment::sft::SFT,
        cardinality: Cardinality {
            min: 0,
            max: Max::Unbounded,
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "EHC_E20.3-UAC",
        position: 3,
        segment: &segment::uac::UAC,
        cardinality: Cardinality {
            min: 0,
            max: Max::Unbounded,
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Group(Group {
        id: "EHC_E20.4-AUTHORIZATION_REQUEST",
        position: 4,
        name: "AUTHORIZATION_REQUEST",
        cardinality: Cardinality {
            min: 1,
            max: Max::Bounded(1),
        },
        kind: GroupKind::Choice,
        children: &[Node::Group(Group {
            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group",
            position: 1,
            name: "Group",
            cardinality: Cardinality {
                min: 0,
                max: Max::Bounded(1),
            },
            kind: GroupKind::Sequence,
            children: &[
                Node::Segment(SegmentRef {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.1-IVC",
                    position: 1,
                    segment: &segment::ivc::IVC,
                    cardinality: Cardinality {
                        min: 1,
                        max: Max::Bounded(1),
                    },
                    status: Some(SegmentStatus::A),
                }),
                Node::Segment(SegmentRef {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.2-CTD",
                    position: 2,
                    segment: &segment::ctd::CTD,
                    cardinality: Cardinality {
                        min: 1,
                        max: Max::Unbounded,
                    },
                    status: Some(SegmentStatus::A),
                }),
                Node::Segment(SegmentRef {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.3-LOC",
                    position: 3,
                    segment: &segment::loc::LOC,
                    cardinality: Cardinality {
                        min: 0,
                        max: Max::Unbounded,
                    },
                    status: Some(SegmentStatus::A),
                }),
                Node::Segment(SegmentRef {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.4-ROL",
                    position: 4,
                    segment: &segment::rol::ROL,
                    cardinality: Cardinality {
                        min: 0,
                        max: Max::Unbounded,
                    },
                    status: Some(SegmentStatus::A),
                }),
                Node::Group(Group {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO",
                    position: 5,
                    name: "PAT_INFO",
                    cardinality: Cardinality {
                        min: 1,
                        max: Max::Unbounded,
                    },
                    kind: GroupKind::Sequence,
                    children: &[
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.1-PID",
                            position: 1,
                            segment: &segment::pid::PID,
                            cardinality: Cardinality {
                                min: 1,
                                max: Max::Bounded(1),
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.2-GSP",
                            position: 2,
                            segment: &segment::gsp::GSP,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Bounded(1),
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.3-GSR",
                            position: 3,
                            segment: &segment::gsr::GSR,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Bounded(1),
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.4-GSC",
                            position: 4,
                            segment: &segment::gsc::GSC,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Bounded(1),
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.5-PRT",
                            position: 5,
                            segment: &segment::prt::PRT,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.6-ACC",
                            position: 6,
                            segment: &segment::acc::ACC,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Group(Group {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.7-INSURANCE",
                            position: 7,
                            name: "INSURANCE",
                            cardinality: Cardinality {
                                min: 1,
                                max: Max::Unbounded,
                            },
                            kind: GroupKind::Sequence,
                            children: &[
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.7-INSURANCE.1-IN1",
                                    position: 1,
                                    segment: &segment::in1::IN1,
                                    cardinality: Cardinality {
                                        min: 1,
                                        max: Max::Bounded(1),
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.7-INSURANCE.2-GSP",
                                    position: 2,
                                    segment: &segment::gsp::GSP,
                                    cardinality: Cardinality {
                                        min: 0,
                                        max: Max::Bounded(1),
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.7-INSURANCE.3-GSR",
                                    position: 3,
                                    segment: &segment::gsr::GSR,
                                    cardinality: Cardinality {
                                        min: 0,
                                        max: Max::Bounded(1),
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.7-INSURANCE.4-IN2",
                                    position: 4,
                                    segment: &segment::in2::IN2,
                                    cardinality: Cardinality {
                                        min: 0,
                                        max: Max::Bounded(1),
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                            ],
                        }),
                        Node::Group(Group {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.8-DIAGNOSIS",
                            position: 8,
                            name: "DIAGNOSIS",
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            kind: GroupKind::Sequence,
                            children: &[
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.8-DIAGNOSIS.1-DG1",
                                    position: 1,
                                    segment: &segment::dg1::DG1,
                                    cardinality: Cardinality {
                                        min: 1,
                                        max: Max::Bounded(1),
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                                Node::Segment(SegmentRef {
                                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.8-DIAGNOSIS.2-NTE",
                                    position: 2,
                                    segment: &segment::nte::NTE,
                                    cardinality: Cardinality {
                                        min: 0,
                                        max: Max::Unbounded,
                                    },
                                    status: Some(SegmentStatus::A),
                                }),
                            ],
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.9-OBX",
                            position: 9,
                            segment: &segment::obx::OBX,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.5-PAT_INFO.10-PRT",
                            position: 10,
                            segment: &segment::prt::PRT,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                    ],
                }),
                Node::Group(Group {
                    id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO",
                    position: 6,
                    name: "PSL_ITEM_INFO",
                    cardinality: Cardinality {
                        min: 1,
                        max: Max::Unbounded,
                    },
                    kind: GroupKind::Sequence,
                    children: &[
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.1-PSL",
                            position: 1,
                            segment: &segment::psl::PSL,
                            cardinality: Cardinality {
                                min: 1,
                                max: Max::Bounded(1),
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.2-NTE",
                            position: 2,
                            segment: &segment::nte::NTE,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.3-ADJ",
                            position: 3,
                            segment: &segment::adj::ADJ,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.4-LOC",
                            position: 4,
                            segment: &segment::loc::LOC,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.5-PRT",
                            position: 5,
                            segment: &segment::prt::PRT,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                        Node::Segment(SegmentRef {
                            id: "EHC_E20.4-AUTHORIZATION_REQUEST.choice-1-Group.6-PSL_ITEM_INFO.6-ROL",
                            position: 6,
                            segment: &segment::rol::ROL,
                            cardinality: Cardinality {
                                min: 0,
                                max: Max::Unbounded,
                            },
                            status: Some(SegmentStatus::A),
                        }),
                    ],
                }),
            ],
        })],
    }),
];

/// The `EHC_E20` message structure definition, `http://hl7.org/v2/StructureDefinition/EHC_E20`.
pub static EHC_E20: Structure = Structure {
    id: "EHC_E20",
    url: Some("http://hl7.org/v2/StructureDefinition/EHC_E20"),
    version: "2.9.1",
    withdrawn_as_of: None,
    nodes: &EHC_E20_NODES,
};