hl7v2-types 0.1.129

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

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

/// The top-level nodes of [`BTS_O31`], one `static` so a structure with the same tree links to it.
pub static BTS_O31_NODES: [Node; 7] = [
    Node::Segment(SegmentRef {
        id: "BTS_O31.1-MSH",
        position: 1,
        segment: &segment::msh::MSH,
        cardinality: Cardinality {
            min: 1,
            max: Max::Bounded(1),
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "BTS_O31.2-ARV",
        position: 2,
        segment: &segment::arv::ARV,
        cardinality: Cardinality {
            min: 0,
            max: Max::Unbounded,
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "BTS_O31.3-SFT",
        position: 3,
        segment: &segment::sft::SFT,
        cardinality: Cardinality {
            min: 0,
            max: Max::Unbounded,
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "BTS_O31.4-UAC",
        position: 4,
        segment: &segment::uac::UAC,
        cardinality: Cardinality {
            min: 0,
            max: Max::Bounded(1),
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Segment(SegmentRef {
        id: "BTS_O31.5-NTE",
        position: 5,
        segment: &segment::nte::NTE,
        cardinality: Cardinality {
            min: 0,
            max: Max::Unbounded,
        },
        status: Some(SegmentStatus::A),
    }),
    Node::Group(Group {
        id: "BTS_O31.6-PATIENT",
        position: 6,
        name: "PATIENT",
        cardinality: Cardinality {
            min: 0,
            max: Max::Bounded(1),
        },
        kind: GroupKind::Sequence,
        children: &[
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.1-PID",
                position: 1,
                segment: &segment::pid::PID,
                cardinality: Cardinality {
                    min: 1,
                    max: Max::Bounded(1),
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.2-PD1",
                position: 2,
                segment: &segment::pd1::PD1,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Bounded(1),
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.3-GSP",
                position: 3,
                segment: &segment::gsp::GSP,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.4-GSR",
                position: 4,
                segment: &segment::gsr::GSR,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.5-GSC",
                position: 5,
                segment: &segment::gsc::GSC,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.6-PRT",
                position: 6,
                segment: &segment::prt::PRT,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.6-PATIENT.7-NTE",
                position: 7,
                segment: &segment::nte::NTE,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Group(Group {
                id: "BTS_O31.6-PATIENT.8-PATIENT_VISIT",
                position: 8,
                name: "PATIENT_VISIT",
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Bounded(1),
                },
                kind: GroupKind::Sequence,
                children: &[
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.6-PATIENT.8-PATIENT_VISIT.1-PV1",
                        position: 1,
                        segment: &segment::pv1::PV1,
                        cardinality: Cardinality {
                            min: 1,
                            max: Max::Bounded(1),
                        },
                        status: Some(SegmentStatus::A),
                    }),
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.6-PATIENT.8-PATIENT_VISIT.2-PV2",
                        position: 2,
                        segment: &segment::pv2::PV2,
                        cardinality: Cardinality {
                            min: 0,
                            max: Max::Bounded(1),
                        },
                        status: Some(SegmentStatus::A),
                    }),
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.6-PATIENT.8-PATIENT_VISIT.3-PRT",
                        position: 3,
                        segment: &segment::prt::PRT,
                        cardinality: Cardinality {
                            min: 0,
                            max: Max::Unbounded,
                        },
                        status: Some(SegmentStatus::A),
                    }),
                ],
            }),
        ],
    }),
    Node::Group(Group {
        id: "BTS_O31.7-ORDER",
        position: 7,
        name: "ORDER",
        cardinality: Cardinality {
            min: 1,
            max: Max::Unbounded,
        },
        kind: GroupKind::Sequence,
        children: &[
            Node::Segment(SegmentRef {
                id: "BTS_O31.7-ORDER.1-ORC",
                position: 1,
                segment: &segment::orc::ORC,
                cardinality: Cardinality {
                    min: 1,
                    max: Max::Bounded(1),
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.7-ORDER.2-PRT",
                position: 2,
                segment: &segment::prt::PRT,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Group(Group {
                id: "BTS_O31.7-ORDER.3-TIMING",
                position: 3,
                name: "TIMING",
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                kind: GroupKind::Sequence,
                children: &[
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.7-ORDER.3-TIMING.1-TQ1",
                        position: 1,
                        segment: &segment::tq1::TQ1,
                        cardinality: Cardinality {
                            min: 1,
                            max: Max::Bounded(1),
                        },
                        status: Some(SegmentStatus::A),
                    }),
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.7-ORDER.3-TIMING.2-TQ2",
                        position: 2,
                        segment: &segment::tq2::TQ2,
                        cardinality: Cardinality {
                            min: 0,
                            max: Max::Unbounded,
                        },
                        status: Some(SegmentStatus::A),
                    }),
                ],
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.7-ORDER.4-BPO",
                position: 4,
                segment: &segment::bpo::BPO,
                cardinality: Cardinality {
                    min: 1,
                    max: Max::Bounded(1),
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Segment(SegmentRef {
                id: "BTS_O31.7-ORDER.5-NTE",
                position: 5,
                segment: &segment::nte::NTE,
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                status: Some(SegmentStatus::A),
            }),
            Node::Group(Group {
                id: "BTS_O31.7-ORDER.6-PRODUCT_STATUS",
                position: 6,
                name: "PRODUCT_STATUS",
                cardinality: Cardinality {
                    min: 0,
                    max: Max::Unbounded,
                },
                kind: GroupKind::Sequence,
                children: &[
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.7-ORDER.6-PRODUCT_STATUS.1-BTX",
                        position: 1,
                        segment: &segment::btx::BTX,
                        cardinality: Cardinality {
                            min: 1,
                            max: Max::Bounded(1),
                        },
                        status: Some(SegmentStatus::A),
                    }),
                    Node::Segment(SegmentRef {
                        id: "BTS_O31.7-ORDER.6-PRODUCT_STATUS.2-NTE",
                        position: 2,
                        segment: &segment::nte::NTE,
                        cardinality: Cardinality {
                            min: 0,
                            max: Max::Unbounded,
                        },
                        status: Some(SegmentStatus::A),
                    }),
                ],
            }),
        ],
    }),
];

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