Examples of ProfileParser


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

            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

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

        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

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

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

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

            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

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

            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

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

        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

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

      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

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

        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

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

            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
TOP
Copyright © 2018 www.massapi.com. 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.