Package ca.uhn.hl7v2.conf.spec.message

Examples of ca.uhn.hl7v2.conf.spec.message.StaticDef


    profile.setHL7Version(root.getAttribute("HL7Version"));

    // get static definition
    NodeList nl = root.getElementsByTagName("HL7v2xStaticDef");
    Element staticDef = (Element) nl.item(0);
    StaticDef sd = parseStaticProfile(staticDef);
    profile.setMessage(sd);
    return profile;
  }
View Full Code Here


    }

    // get static definition
    NodeList nl = root.getElementsByTagName("HL7v2xStaticDef");
    Element staticDef = (Element) nl.item(0);
    StaticDef sd = parseStaticProfile(staticDef);
    profile.setMessage(sd);
    return profile;
  }
View Full Code Here

    profile.setMessage(sd);
    return profile;
  }

  private StaticDef parseStaticProfile(Element elem) throws ProfileException {
    StaticDef message = new StaticDef();
    message.setMsgType(elem.getAttribute("MsgType"));
    message.setEventType(elem.getAttribute("EventType"));
    message.setMsgStructID(elem.getAttribute("MsgStructID"));
    message.setOrderControl(elem.getAttribute("OrderControl"));
    message.setEventDesc(elem.getAttribute("EventDesc"));
    message.setIdentifier(elem.getAttribute("identifier"));
    message.setRole(elem.getAttribute("role"));

    Element md = getFirstElementByTagName("MetaData", elem);
    if (md != null)
      message.setMetaData(parseMetaData(md));

    message.setImpNote(getValueOfFirstElement("ImpNote", elem));
    message.setDescription(getValueOfFirstElement("Description", elem));
    message.setReference(getValueOfFirstElement("Reference", elem));

    parseChildren(message, elem);
    return message;
  }
View Full Code Here

    profile.setHL7Version(root.getAttribute("HL7Version"));

    // get static definition
    NodeList nl = root.getElementsByTagName("HL7v2xStaticDef");
    Element staticDef = (Element) nl.item(0);
    StaticDef sd = parseStaticProfile(staticDef);
    profile.setMessage(sd);
    return profile;
  }
View Full Code Here

    profile.setHL7Version(root.getAttribute("HL7Version"));

    // get static definition
    NodeList nl = root.getElementsByTagName("HL7v2xStaticDef");
    Element staticDef = (Element) nl.item(0);
    StaticDef sd = parseStaticProfile(staticDef);
    profile.setMessage(sd);
    return profile;
  }
View Full Code Here

    profile.setMessage(sd);
    return profile;
  }

  private StaticDef parseStaticProfile(Element elem) throws ProfileException {
    StaticDef message = new StaticDef();
    message.setMsgType(elem.getAttribute("MsgType"));
    message.setEventType(elem.getAttribute("EventType"));
    message.setMsgStructID(elem.getAttribute("MsgStructID"));
    message.setOrderControl(elem.getAttribute("OrderControl"));
    message.setEventDesc(elem.getAttribute("EventDesc"));
    message.setIdentifier(elem.getAttribute("identifier"));
    message.setRole(elem.getAttribute("role"));

    Element md = getFirstElementByTagName("MetaData", elem);
    if (md != null)
      message.setMetaData(parseMetaData(md));

    message.setImpNote(getValueOfFirstElement("ImpNote", elem));
    message.setDescription(getValueOfFirstElement("Description", elem));
    message.setReference(getValueOfFirstElement("Reference", elem));

    parseChildren(message, elem);
    return message;
  }
View Full Code Here

     * @param message New value of property message.
     *
     * @throws ProfileException
     */
    public void setMessage(StaticDef message) throws ProfileException {
        StaticDef oldMessage = this.message;
        try {
            vetoableChangeSupport.fireVetoableChange("message", oldMessage, message);
        } catch (Exception e) {
            throw new ProfileException(null, e);
        }
View Full Code Here

public class HL7Server {

    private SimpleServer server;

    public HL7Server(int port) {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The transport protocol
        PipeParser parser = new PipeParser();
        server = new SimpleServer(port, llp, parser);
    }
View Full Code Here

        return new HL7Endpoint();
    }

    @Override
    protected void startEndpoint(HL7Endpoint endpoint) throws AxisFault {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();
        PipeParser parser = new PipeParser();
        SimpleServer server = new SimpleServer(endpoint.getPort(), llp, parser);
        Application callback = new HL7MessageProcessor(endpoint);
        server.registerApplication("*", "*", callback);
        server.start();
View Full Code Here

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina2:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            Message input = exchange.getIn().getBody(Message.class);

                            assertEquals("2.4", input.getVersion());
                            QRD qrd = (QRD)input.get("QRD");
                            assertEquals("0101701234", qrd.getWhoSubjectFilter(0).getIDNumber().getValue());

                            Message response = createHL7AsMessage();
                            exchange.getOut().setBody(response);
                        }
                    })
                    .to("mock:result");
            }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.conf.spec.message.StaticDef

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.