Package ca.uhn.hl7v2.view

Examples of ca.uhn.hl7v2.view.TreePanel


            @Override
            public ValidationException[] test(Message msg) {
                ADT_A01 a01 = (ADT_A01)msg;
                if (a01.getPID().getAdministrativeSex().getValue() == null) {
                    ValidationException[] e = new ValidationException[1];
                    e[0] = new ValidationException("No gender provided!");
                    return e;
                }
                return VALIDATION_OK;
            }
View Full Code Here


        Parser ediParser = new PipeParser();
        ediParser.setValidationContext(new NoValidation());
        String xmlDoc = null;
        try {
            Message message = ediParser.parse(rowHL7);
            ConformanceProfileRule rule = new ConformanceProfileRule();
        ValidationException[] exs = rule.test(message);
        if (exs != null && exs.length > 0) {
          throw new HL7Exception(exs[0].getMessage());
       
            if(log.isDebugEnabled()){
                log.debug("HL7 parsing completed." + message);
View Full Code Here

    private ValidationContext defaultContext;
    private ValidationContextImpl customContext;

    @Override
    protected void doPreSetup() throws Exception {
        defaultContext = new DefaultValidation();
        customContext = new DefaultValidation();
        @SuppressWarnings("serial")
        MessageRule rule = new MessageRule() {

            @Override
            public String getDescription() {
View Full Code Here

            public ValidationException[] apply(Message msg) {
                return test(msg);
            }

        };
        MessageRuleBinding binding = new MessageRuleBinding("2.4", "ADT", "A01", rule);
        customContext.getMessageRuleBindings().add(binding);
    }
View Full Code Here

        // Helper class
    }

    private static Parser getParser() {
        PipeParser pipeParser = new PipeParser();
        pipeParser.setValidationContext(new NoValidation());
        return pipeParser;
    }
View Full Code Here

     * @return XML String
     */
    private String serializeHL7toXML(String rowHL7) {
        Parser xmlParser = new DefaultXMLParser();
        Parser ediParser = new PipeParser();
        ediParser.setValidationContext(new NoValidation());
        String xmlDoc = null;
        try {
            Message message = ediParser.parse(rowHL7);
            ConformanceProfileRule rule = new ConformanceProfileRule();
        ValidationException[] exs = rule.test(message);
View Full Code Here

    // inbound on bottom
    // and plain text on left, tree on right
    this.setLayout(new BorderLayout());
    outboundText = new JTextArea(10, 10);
    JScrollPane outTextScroll = new JScrollPane(outboundText);
    outboundTree = new TreePanel();
    JScrollPane outTreeScroll = new JScrollPane(outboundTree);
    inboundText = new JTextArea(10, 10);
    JScrollPane inTextScroll = new JScrollPane(inboundText);
    inboundTree = new TreePanel();
    JScrollPane inTreeScroll = new JScrollPane(inboundTree);

    JSplitPane outbound = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
        addTitle(outTextScroll, " Outbound Message Text "), addTitle(
            outTreeScroll, " Outbound Message Tree "));
View Full Code Here

    // inbound on bottom
    // and plain text on left, tree on right
    this.setLayout(new BorderLayout());
    outboundText = new JTextArea(10, 10);
    JScrollPane outTextScroll = new JScrollPane(outboundText);
    outboundTree = new TreePanel();
    JScrollPane outTreeScroll = new JScrollPane(outboundTree);
    inboundText = new JTextArea(10, 10);
    JScrollPane inTextScroll = new JScrollPane(inboundText);
    inboundTree = new TreePanel();
    JScrollPane inTreeScroll = new JScrollPane(inboundTree);

    JSplitPane outbound = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
        addTitle(outTextScroll, " Outbound Message Text "), addTitle(
            outTreeScroll, " Outbound Message Tree "));
View Full Code Here

    // inbound on bottom
    // and plain text on left, tree on right
    this.setLayout(new BorderLayout());
    outboundText = new JTextArea(10, 10);
    JScrollPane outTextScroll = new JScrollPane(outboundText);
    outboundTree = new TreePanel();
    JScrollPane outTreeScroll = new JScrollPane(outboundTree);
    inboundText = new JTextArea(10, 10);
    JScrollPane inTextScroll = new JScrollPane(inboundText);
    inboundTree = new TreePanel();
    JScrollPane inTreeScroll = new JScrollPane(inboundTree);

    JSplitPane outbound = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
        addTitle(outTextScroll, " Outbound Message Text "), addTitle(
            outTreeScroll, " Outbound Message Tree "));
View Full Code Here

    private void initUI() {
        //main part of panel shows grid of 4 message areas: outbound on top; inbound on bottom
        //   and plain text on left, tree on right
        this.setLayout(new BorderLayout());
        outboundText = new JTextArea(10, 10); JScrollPane outTextScroll = new JScrollPane(outboundText);
        outboundTree = new TreePanel(this.pparser); JScrollPane outTreeScroll = new JScrollPane(outboundTree);
        inboundText = new JTextArea(10, 10); JScrollPane inTextScroll = new JScrollPane(inboundText);
        inboundTree = new TreePanel(this.pparser); JScrollPane inTreeScroll = new JScrollPane(inboundTree);
       
        JSplitPane outbound = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, addTitle(outTextScroll, " Outbound Message Text "), addTitle(outTreeScroll, " Outbound Message Tree "));
        JSplitPane inbound = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, addTitle(inTextScroll, " Inbound Message Text "), addTitle(inTreeScroll, " Inbound Message Tree "));
        messages = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, outbound, inbound);
       
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.view.TreePanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.