Tabnine Logo
ca.uhn.hl7v2.util
Code IndexAdd Tabnine to your IDE (free)

How to use ca.uhn.hl7v2.util

Best Java code snippets using ca.uhn.hl7v2.util (Showing top 20 results out of 315)

origin: pentaho/pentaho-kettle

public static List<HL7Value> extractValues( Message message ) throws Exception {
 Terser terser = new Terser( message );
 SegmentFinder finder = terser.getFinder();
 List<HL7Value> values = new ArrayList<HL7Value>();
 int childNr = 1;
 while ( finder.hasNextChild() ) {
  // next group in the message (MSH, PID, EVN and so on)
  //
  finder.nextChild();
  Structure[] structures = finder.getCurrentChildReps();
  for ( int i = 0; i < structures.length; i++ ) {
   Structure structure = structures[i];
   parseStructure( values, message, terser, structure, Integer.toString( childNr ) );
  }
  childNr++;
 }
 return values;
}
origin: pentaho/pentaho-kettle

Type[] types = segment.getField( n );
for ( int t = 0; t < types.length; t++ ) {
 int nrComponents = Terser.numComponents( types[t] );
 for ( int c = 1; c <= nrComponents; c++ ) {
  int nrSub = Terser.numSubComponents( types[t], c );
  for ( int sc = 1; sc <= nrSub; sc++ ) {
   String string = Terser.get( segment, n, t, c, sc );
origin: ca.uhn.hapi/hapi-base

private String[] getCurrentValues(String[] thePaths)
    throws HL7Exception {
  String[] paths = composePaths(thePaths);
  String[] values = new String[paths.length];
  for (int i = 0; i < paths.length; i++) {
    values[i] = myTerser.get(paths[i]);
    if (values[i] == null) {
      values[i] = "";
    }
  }
  return values;
}
origin: org.openehealth.ipf.gazelle/ipf-gazelle-validation-commons-core

/**
 * @return structure of the message, e.g. '2.5.1'
 */
public static String messageVersion(Terser t) throws HL7Exception {
  return t.get("/MSH-12-1");
}
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * @param theRoot root of depth first iteration, which starts with the first child
 * @param c structure class to look for
 * @return an iterator that skips all structures that do not match the parameter
 */
public static Iterator<Structure> createPopulatedStructureIterator(Group theRoot, Class<? extends Structure> c) {
  return createPopulatedStructureIterator(theRoot, new StructurePredicate(c));       
}    
origin: ca.uhn.hapi/hapi-base

/**
 * @param theRoot root of depth first iteration, which starts with the first child
 * @param structureName structure name to look for
 * @return an iterator that skips all structures that do not match the parameter
 */
public static Iterator<Structure> createPopulatedStructureIterator(Group theRoot, String structureName) {
  return createPopulatedStructureIterator(theRoot, new StructureNamePredicate(structureName));
}

origin: ca.uhn.hapi/hapi-base

/** 
 * A convenience method that returns an interface code from an underlying 
 * CodeMapper instance by calling <code>CodeMapper.getInstance().getInterfaceCode(...)</code>
 */
public static String getInt(String interfaceName, int hl7Table, String localCode) throws HL7Exception {
  return CodeMapper.getInstance().getInterfaceCode(interfaceName, hl7Table, localCode);
}

origin: ca.uhn.hapi/hapi-base

/**
 * {@inheritDoc}
 */
public boolean hasNext() {
  return myWrapped.hasNext();
}
origin: ca.uhn.hapi/hapi-osgi-base

/** 
 * A convenience method that returns a local code from an underlying 
 * CodeMapper instance by calling <code>CodeMapper.getInstance().getLocalCode(...)</code>
 */
public static String getLocal(String interfaceName, int hl7Table, String interfaceCode) throws HL7Exception {
  return CodeMapper.getInstance().getLocalCode(interfaceName, hl7Table, interfaceCode);
}
origin: ca.uhn.hapi/hapi-base

/**
 * Constructor
 * 
 * @param theReader
 *            The reader to read from
 * @param theHapiContext
 *              The HapiContext from which to obtain the parser
 */
public Hl7InputStreamMessageIterator(Reader theReader, HapiContext theHapiContext) {
  super(theHapiContext);
  myWrapped = new Hl7InputStreamMessageStringIterator(theReader);
}
origin: ca.uhn.hapi/hapi-osgi-base

public Position(Group parent, String name, int rep) {
  this.parent = parent;
  this.index = new Index(name, rep);
}
public Position(Group parent, Index i) {
origin: ca.uhn.hapi/hapi-osgi-base

public boolean hasNext() {
  if (nextObjectSet) {
    return true;
  } else {
    return setNextObject();
  }
}

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

private int[] getMaxNumEmpty(String[] theLoopPoints) {
  int[] retVal = new int[theLoopPoints.length];
  for (int i = 0; i < theLoopPoints.length; i++) {
    retVal[i] = getMaxNumEmpty(theLoopPoints[i]);
  }
  return retVal;
}
origin: ca.uhn.hapi/hapi-osgi-base

private boolean referencesLoop(String theFieldPath, int theLoopPoint) {
  String path = theFieldPath;
  int lp;
  while ((lp = getLoopPointReference(path)) >= 0) {
    if (lp == theLoopPoint) {
      return true;
    } else {
      path = myLoopPoints[lp];
    }
  }
  return false;
}
origin: ca.uhn.hapi/hapi-base

public AcceptorThread(int port, boolean tls, ExecutorService service, BlockingQueue<AcceptedSocket> queue, SocketFactory socketFactory) {
  super("Socket Acceptor", service);
  this.port = port;
  this.queue = queue;
  this.tls = tls;
  if (socketFactory == null) {
    socketFactory = new StandardSocketFactory();
  }
  this.socketFactory = socketFactory;
}
origin: ca.uhn.hapi/hapi-base

/**
 * Returns a singleton instance of CodeMapper.  This is currently 
 * a FileCodeMapper by default.  
 */
public synchronized static CodeMapper getInstance() throws HL7Exception {
  if (codeMapper == null) {
    //create new file code mapper 
    codeMapper = new FileCodeMapper();
  }
  return codeMapper;
}

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

private String[] getCurrentValues(String[] thePaths)
    throws HL7Exception {
  String[] paths = composePaths(thePaths);
  String[] values = new String[paths.length];
  for (int i = 0; i < paths.length; i++) {
    values[i] = myTerser.get(paths[i]);
    if (values[i] == null) {
      values[i] = "";
    }
  }
  return values;
}
origin: ca.uhn.hapi/hapi-base

/**
 * @param theRoot root of depth first iteration, which starts with the first child
 * @param c structure class to look for
 * @return an iterator that skips all structures that do not match the parameter
 */
public static Iterator<Structure> createPopulatedStructureIterator(Group theRoot, Class<? extends Structure> c) {
  return createPopulatedStructureIterator(theRoot, new StructurePredicate(c));       
}    
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * @param theRoot root of depth first iteration, which starts with the first child
 * @param structureName structure name to look for
 * @return an iterator that skips all structures that do not match the parameter
 */
public static Iterator<Structure> createPopulatedStructureIterator(Group theRoot, String structureName) {
  return createPopulatedStructureIterator(theRoot, new StructureNamePredicate(structureName));
}

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

/** 
 * A convenience method that returns an interface code from an underlying 
 * CodeMapper instance by calling <code>CodeMapper.getInstance().getInterfaceCode(...)</code>
 */
public static String getInt(String interfaceName, int hl7Table, String localCode) throws HL7Exception {
  return CodeMapper.getInstance().getInterfaceCode(interfaceName, hl7Table, localCode);
}

ca.uhn.hl7v2.util

Most used classes

  • Terser
    Wraps a message to provide access to fields using a terse location specification syntax. For exampl
  • Hl7InputStreamMessageIterator
    Reads from an InputStream containing a stream of encoded HL7 messages and iterates over those messa
  • Hl7InputStreamMessageStringIterator
    Reads from an InputStream containing a stream of encoded HL7 messages and iterates over those messa
  • SegmentFinder
    A tool for getting segments by name within a message or part of a message.
  • ArrayUtil
    Utility methods for working with arrays
  • DeepCopy,
  • EncodedMessageComparator,
  • FileCodeMapper,
  • FilterIterator$Predicate,
  • FilterIterator,
  • Hl7InputStreamMessageStringIterator$ParseFailureError,
  • Home,
  • MessageIDGenerator,
  • MessageIterator$Index,
  • MessageIterator$Position,
  • MessageIterator,
  • MessageNavigator$GroupContext,
  • MessageNavigator,
  • MessageQuery$ResultImpl
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