Package ca.uhn.hl7v2.conf.parser

Examples of ca.uhn.hl7v2.conf.parser.ProfileParser


        + "EVN|A31|200903230934\r\n"
        + "PID|1||29^^CAISI_1-2^PI~\"\"||Test300^Leticia^^^^^L||19770202|M||||||||||||||||||||||";
    Message validMessage = new PipeParser().parse(validMessageString);

    // Load a conformance profile
    ProfileParser profileParser = new ProfileParser(false);
    RuntimeProfile profile = profileParser.parseClasspath("ca/uhn/hl7v2/examples/profiles/ADT_A31.xml");

    // Create a conformance validator, and validate
    DefaultValidator validator = new DefaultValidator();
    HL7Exception[] exceptions = validator.validate(validMessage, profile.getMessage());
   
View Full Code Here


            String msgString = loadFile(args[0]);
            Parser parser = new GenericParser();
            Message message = parser.parse(msgString);
           
            String profileString = loadFile(args[1]);
            ProfileParser profParser = new ProfileParser(true);
            RuntimeProfile profile = profParser.parse(profileString);
           
            HL7Exception[] exceptions = val.validate(message, profile.getMessage());
           
            System.out.println("Exceptions: ");
            for (int i = 0; i < exceptions.length; i++) {
View Full Code Here

            String msgString = loadFile(args[0]);
            Parser parser = new GenericParser();
            Message message = parser.parse(msgString);
           
            String profileString = loadFile(args[1]);
            ProfileParser profParser = new ProfileParser(true);
            RuntimeProfile profile = profParser.parse(profileString);
           
            HL7Exception[] exceptions = val.validate(message, profile.getMessage());
           
            System.out.println("Exceptions: ");
            for (int i = 0; i < exceptions.length; i++) {
View Full Code Here

        HL7Exception[] exceptions = null;
        DefaultValidator val = new DefaultValidator();
        try {
            String profileString = ProfileStoreFactory.getProfileStore().getProfile(id);
            if (profileString != null) {
                ProfileParser profParser = new ProfileParser(true);
                RuntimeProfile profile = profParser.parse(profileString);
               
                exceptions = val.validate(message, profile.getMessage());
            } else {
                throw new ProfileException("Unable to find the profile " + id);
            }
View Full Code Here

      String msgString = loadFile(args[0]);
      Parser parser = new GenericParser();
      Message message = parser.parse(msgString);

      String profileString = loadFile(args[1]);
      ProfileParser profParser = new ProfileParser(true);
      RuntimeProfile profile = profParser.parse(profileString);

      HL7Exception[] exceptions = val.validate(message, profile.getMessage());

      System.out.println("Exceptions: ");
      for (int i = 0; i < exceptions.length; i++) {
View Full Code Here

        HL7Exception[] exceptions = null;
        DefaultValidator val = new DefaultValidator();
        try {
            String profileString = ProfileStoreFactory.getProfileStore().getProfile(id);
            if (profileString != null) {
                ProfileParser profParser = new ProfileParser(true);
                RuntimeProfile profile = profParser.parse(profileString);
               
                exceptions = val.validate(message, profile.getMessage());
            } else {
                throw new ProfileException("Unable to find the profile " + id);
            }
View Full Code Here

            String msgString = loadFile(args[0]);
            Parser parser = new GenericParser();
            Message message = parser.parse(msgString);
           
            String profileString = loadFile(args[1]);
            ProfileParser profParser = new ProfileParser(true);
            RuntimeProfile profile = profParser.parse(profileString);
           
            HL7Exception[] exceptions = val.validate(message, profile.getMessage());
           
            System.out.println("Exceptions: ");
            for (int i = 0; i < exceptions.length; i++) {
View Full Code Here

      String msgString = loadFile(args[0]);
      Parser parser = new GenericParser();
      Message message = parser.parse(msgString);

      String profileString = loadFile(args[1]);
      ProfileParser profParser = new ProfileParser(true);
      RuntimeProfile profile = profParser.parse(profileString);

      HL7Exception[] exceptions = val.validate(message, profile.getMessage());

      System.out.println("Exceptions: ");
      for (int i = 0; i < exceptions.length; i++) {
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

TOP

Related Classes of ca.uhn.hl7v2.conf.parser.ProfileParser

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.