congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GenericParser.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ca.uhn.hl7v2.parser.GenericParser
constructor

Best Java code snippets using ca.uhn.hl7v2.parser.GenericParser.<init> (Showing top 20 results out of 315)

origin: pentaho/pentaho-kettle

Parser parser = new GenericParser();
ValidationContext validationContext = new NoValidation();
parser.setValidationContext( validationContext );
origin: pentaho/pentaho-kettle

meta.getFields( data.outputRowMeta, getStepname(), null, null, this, repository, metaStore );
data.parser = new GenericParser();
data.parser.setValidationContext( new NoValidation() );
origin: pentaho/pentaho-kettle

Parser parser = new GenericParser();
ValidationContext validationContext = new NoValidation();
parser.setValidationContext( validationContext );
origin: ca.uhn.hapi/hapi-base

public synchronized GenericParser getGenericParser() {
  if (genericParser == null) {
    genericParser = new GenericParser(this);
  }
  return genericParser;
}
origin: ca.uhn.hapi/hapi-osgi-base

public synchronized GenericParser getGenericParser() {
  if (genericParser == null) {
    genericParser = new GenericParser(this);
  }
  return genericParser;
}
origin: ca.uhn.hapi/hapi-base

/**
 * Creates an instance that uses a <code>GenericParser</code>.
 */
@Deprecated
public ApplicationRouterImpl() {
  this(new GenericParser());
}
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Creates an instance that uses a <code>GenericParser</code>.
 */
@Deprecated
public ApplicationRouterImpl() {
  this(new GenericParser());
}
origin: ca.uhn.hapi/hapi-base

/**
 * Creates an instance that uses a <code>GenericParser</code>
 * @param theProcessor the <code>Processor</code> used to communicate 
 *  with the remote system
 */
public InitiatorImpl(Processor theProcessor) {
  myMetadataFields = new ArrayList<String>(20);
  myMetadataFields.add("MSH-18"); //add character set by default
  myParser = new GenericParser();
  myProcessor = theProcessor;
  init();
}

origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Creates an instance that uses a <code>GenericParser</code>
 * @param theProcessor the <code>Processor</code> used to communicate 
 *  with the remote system
 */
public InitiatorImpl(Processor theProcessor) {
  myMetadataFields = new ArrayList<String>(20);
  myMetadataFields.add("MSH-18"); //add character set by default
  myParser = new GenericParser();
  myProcessor = theProcessor;
  init();
}

origin: ca.uhn.hapi/hapi-osgi-base

public static void main(String[] args) throws HL7Exception {
  String msgString = "MSH|^~\\&|RAMSOFT|SENDING FACILITY|RAMSOFT|RECEIVING FACILITY|20101223202939-0400||ADT^A08|101|P|2.3.1||||||||\r"
      + "EVN|A08|20101223202939-0400||||\r"
      + "PID||P12345^^^ISSUER|P12345^^^ISSUER||PATIENT^TEST^M^^^^||19741018|M|||10808 FOOTHILL BLVD^^RANCHO CUCAMONGA^CA^91730^US||(909)481-5872^^^sales@ramsoft.com|(909)481-5800x1||M||12345|286-50-9510|||\r"
      + "PV1||O||||||||||||||||||||||||||||||||||||||||||||||||||\r"
      + "AL1|1||^PORK^|\r"
      + "AL1|2||^PENICILLIN^|";
  GenericParser parser = new GenericParser();
  parser.setValidationContext(ValidationContextFactory.noValidation());
  Message msg = parser.parse(msgString);
  System.out.println(msg.getClass().getName());
}
origin: ca.uhn.hapi/hapi-base

public static void main(String[] args) throws HL7Exception {
  String msgString = "MSH|^~\\&|RAMSOFT|SENDING FACILITY|RAMSOFT|RECEIVING FACILITY|20101223202939-0400||ADT^A08|101|P|2.3.1||||||||\r"
      + "EVN|A08|20101223202939-0400||||\r"
      + "PID||P12345^^^ISSUER|P12345^^^ISSUER||PATIENT^TEST^M^^^^||19741018|M|||10808 FOOTHILL BLVD^^RANCHO CUCAMONGA^CA^91730^US||(909)481-5872^^^sales@ramsoft.com|(909)481-5800x1||M||12345|286-50-9510|||\r"
      + "PV1||O||||||||||||||||||||||||||||||||||||||||||||||||||\r"
      + "AL1|1||^PORK^|\r"
      + "AL1|2||^PENICILLIN^|";
  GenericParser parser = new GenericParser();
  parser.setValidationContext(ValidationContextFactory.noValidation());
  Message msg = parser.parse(msgString);
  System.out.println(msg.getClass().getName());
}
origin: stackoverflow.com

 // the ANTLR grammar
File f = new File("src/test/ressources/Java.g4");
// plug the ANTLR grammar in 
GenericParser gp = new GenericParser(f, "Java");
// load the file that we'd like to parse into a String variable
String s = FileUtils.loadFileContent("src/test/ressources/HelloWorld.java");
// this listener will create an AST from the java file    
gp.setListener(new DefaultTreeListener());
// compile Parser/Lexer
gp.compile();
ParserRuleContext ctx = ctx = gp.parse(s);
// get access to AST
Ast ast = dlist.getAst();
// print AST in dot format
System.out.println(ast.toDot());
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Convenience factory method which returns an instance that has a {@link NoValidation
 * NoValidation validation context}.
 *
 * @return instance of GenericParser without validation
 */
public static GenericParser getInstanceWithNoValidation() {
  return new GenericParser(
      new DefaultHapiContext(ValidationContextFactory.noValidation()));
}
origin: ca.uhn.hapi/hapi-base

/**
 * Convenience factory method which returns an instance that has a {@link NoValidation
 * NoValidation validation context}.
 *
 * @return instance of GenericParser without validation
 */
public static GenericParser getInstanceWithNoValidation() {
  return new GenericParser(
      new DefaultHapiContext(ValidationContextFactory.noValidation()));
}
origin: ca.uhn.hapi/hapi-osgi-base

public static void main(String args[]) {
  if (args.length != 2) {
    System.out.println("Usage: DefaultValidator message_file profile_file");
    System.exit(1);
  }
  DefaultValidator val = new DefaultValidator();
  try {
    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++) {
      System.out.println((i + 1) + ". " + exceptions[i].getMessage());
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
}
origin: ca.uhn.hapi/hapi-base

public static void main(String args[]) {
  if (args.length != 2) {
    System.out.println("Usage: DefaultValidator message_file profile_file");
    System.exit(1);
  }
  DefaultValidator val = new DefaultValidator();
  try {
    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++) {
      System.out.println((i + 1) + ". " + exceptions[i].getMessage());
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
}
origin: openmrs/openmrs-module-webservices.rest

Parser parser = new GenericParser();
Message msg = parser.parse(hl7);
Terser terser = new Terser(msg);
origin: ca.uhn.hapi/hapi-examples

Parser p = new GenericParser();
origin: ca.uhn.hapi/hapi-examples

    + "GT1||0222PL|NOTREAL^BOB^B||STREET^OTHER STREET^CITY^ST^77787|(444)999-3333|(222)777-5555||||MO|111-33-5555||||NOTREAL GILL N|STREET^OTHER STREET^CITY^ST^99999|(111)222-3333\r"
    + "IN1||022254P|4558PD|BLUE CROSS|STREET^OTHER STREET^CITY^ST^00990||(333)333-6666||221K|LENIX|||19980515|19990515|||PATIENT01 TEST D||||||||||||||||||02LL|022LP554";
Parser p = new GenericParser();
Message adt = p.parse(msg);
origin: ca.uhn.hapi/hapi-examples

    + "GT1||0222PL|NOTREAL^BOB^B||STREET^OTHER STREET^CITY^ST^77787|(444)999-3333|(222)777-5555||||MO|111-33-5555||||NOTREAL GILL N|STREET^OTHER STREET^CITY^ST^99999|(111)222-3333\r"
    + "IN1||022254P|4558PD|BLUE CROSS|STREET^OTHER STREET^CITY^ST^00990||(333)333-6666||221K|LENIX|||19980515|19990515|||PATIENT01 TEST D||||||||||||||||||02LL|022LP554";
Parser p = new GenericParser();
Message hapiMsg = p.parse(msg);
ca.uhn.hl7v2.parserGenericParser<init>

Javadoc

Creates a new instance of GenericParser

Popular methods of GenericParser

  • parse
  • encode
  • getAppropriateParser
    Checks the encoding of the message using getEncoding(), and returns the corresponding parser (either
  • getCriticalResponseData
    Returns a minimal amount of data from a message string, including only the data needed to send a re
  • getEncoding
    Returns a String representing the encoding of the given message, if the encoding is recognized. For
  • setPipeParserAsPrimary
    Sets the underlying PipeParser as the primary parser, so that subsequent calls to encode() will retu
  • setValidationContext
  • compile
  • setListener

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now