congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Message.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
ca.uhn.hl7v2.model.Message

Best Java code snippets using ca.uhn.hl7v2.model.Message.getName (Showing top 15 results out of 315)

origin: openmrs/openmrs-core

/**
 * Always returns true, assuming that the router calling this handler will only call this
 * handler with ADT_A28 messages.
 *
 * @return true
 */
@Override
public boolean canProcess(Message message) {
  return message != null && "ADT_A28".equals(message.getName());
}

origin: openmrs/openmrs-core

/**
 * Always returns true, assuming that the router calling this handler will only call this
 * handler with ORU_R01 messages.
 *
 * @return true
 */
@Override
public boolean canProcess(Message message) {
  return message != null && "ORU_R01".equals(message.getName());
}

origin: openmrs/openmrs-core

/**
 * @see org.openmrs.hl7.HL7Service#processHL7Message(ca.uhn.hl7v2.model.Message)
 */
@Override
public Message processHL7Message(Message message) throws HL7Exception {
  // Any post-parsing (pre-routing) processing would go here
  // or a module can use AOP to do the post-parsing
  
  Message response;
  try {
    if (!router.canProcess(message)) {
      throw new HL7Exception("No route for hl7 message: " + message.getName()
          + ". Make sure you have a module installed that registers a hl7handler for this type");
    }
    response = router.processMessage(message);
  }
  catch (ApplicationException e) {
    throw new HL7Exception("Error while processing HL7 message: " + message.getName(), e);
  }
  
  return response;
}

origin: ca.uhn.hapi/hapi-base

  retVal = definitions.get(theMessage.getName());
  if (retVal != null) {
    return retVal;
  if (!appliesTo.contains(theMessage.getName())) {
    throw new HL7Exception("Superstructure " + theMessage.getClass().getSimpleName() + " does not apply to message " + theMessage.getName() + ", can not parse.");
  retVal = createStructureDefinition(theMessage, previousLeaf, theMessage.getName());
} else {
  Message message = ReflectionUtil.instantiateMessage(clazz, getFactory());
  Holder<StructureDefinition> previousLeaf = new Holder<StructureDefinition>();
  retVal = createStructureDefinition(message, previousLeaf, theMessage.getName());
  myStructureDefinitions.get(clazz).put(theMessage.getName(), retVal);
origin: ca.uhn.hapi/hapi-osgi-base

  retVal = definitions.get(theMessage.getName());
  if (retVal != null) {
    return retVal;
  if (!appliesTo.contains(theMessage.getName())) {
    throw new HL7Exception("Superstructure " + theMessage.getClass().getSimpleName() + " does not apply to message " + theMessage.getName() + ", can not parse.");
  retVal = createStructureDefinition(theMessage, previousLeaf, theMessage.getName());
} else {
  Message message = ReflectionUtil.instantiateMessage(clazz, getFactory());
  Holder<StructureDefinition> previousLeaf = new Holder<StructureDefinition>();
  retVal = createStructureDefinition(message, previousLeaf, theMessage.getName());
  myStructureDefinitions.get(clazz).put(theMessage.getName(), retVal);
origin: ca.uhn.hapi/hapi-base

String messageName = groupObject.getMessage().getName();
  String childName = nextChildName;
  if(groupObject.isGroup(nextChildName)) {
    childName = makeGroupElementName(groupObject.getMessage().getName(), nextChildName);
origin: ca.uhn.hapi/hapi-osgi-base

String messageName = groupObject.getMessage().getName();
  String childName = nextChildName;
  if(groupObject.isGroup(nextChildName)) {
    childName = makeGroupElementName(groupObject.getMessage().getName(), nextChildName);
origin: ca.uhn.hapi/hapi-base

String messageName = groupObject.getMessage().getName();
origin: ca.uhn.hapi/hapi-osgi-base

private void checkStructure(SuperStructure theMsg, List<ValidationException> theExceptions) {
  String messageStructure = theMsg.getMessage().getName();
  Set<String> nonStandardNames = theMsg.getNonStandardNames();
  FORNAME:
  for (String name : theMsg.getNames()) {
    if (nonStandardNames != null && nonStandardNames.contains(name)) {
      continue;
    }
    
    try {
      for (Structure rep : theMsg.getAll(name)) {
        
        if (!rep.isEmpty()) {
          Set<String> structuresWhichChildAppliesTo = theMsg.getStructuresWhichChildAppliesTo(name);
          if (!structuresWhichChildAppliesTo.contains(messageStructure)) {
            String msgSimpleName = theMsg.getMessage().getClass().getSimpleName();
            theExceptions.add(new ValidationException("Message (superstructure " + msgSimpleName + ") of type " + messageStructure + " must not have content in " + name));
          }
          continue FORNAME;
        }
        
      }
    } catch (HL7Exception e) {
      // should not happen
      throw new Error("Can't get rep of structure " + name + ". This is probably a HAPI bug");
    }
    
  }
}
origin: ca.uhn.hapi/hapi-base

private void checkStructure(SuperStructure theMsg, List<ValidationException> theExceptions) {
  String messageStructure = theMsg.getMessage().getName();
  Set<String> nonStandardNames = theMsg.getNonStandardNames();
  FORNAME:
  for (String name : theMsg.getNames()) {
    if (nonStandardNames != null && nonStandardNames.contains(name)) {
      continue;
    }
    
    try {
      for (Structure rep : theMsg.getAll(name)) {
        
        if (!rep.isEmpty()) {
          Set<String> structuresWhichChildAppliesTo = theMsg.getStructuresWhichChildAppliesTo(name);
          if (!structuresWhichChildAppliesTo.contains(messageStructure)) {
            String msgSimpleName = theMsg.getMessage().getClass().getSimpleName();
            theExceptions.add(new ValidationException("Message (superstructure " + msgSimpleName + ") of type " + messageStructure + " must not have content in " + name));
          }
          continue FORNAME;
        }
        
      }
    } catch (HL7Exception e) {
      // should not happen
      throw new Error("Can't get rep of structure " + name + ". This is probably a HAPI bug");
    }
    
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

String messageName = groupObject.getMessage().getName();
origin: ca.uhn.hapi/hapi-osgi-base

@Override
public void parse(Message message, String string) throws HL7Exception {
  if (message instanceof AbstractSuperMessage && message.getName() == null) {
    String structure = getStructure(string).messageStructure;
    ((AbstractSuperMessage) message).setName(structure);
origin: ca.uhn.hapi/hapi-base

@Override
public void parse(Message message, String string) throws HL7Exception {
  if (message instanceof AbstractSuperMessage && message.getName() == null) {
    String structure = getStructure(string).messageStructure;
    ((AbstractSuperMessage) message).setName(structure);
origin: ca.uhn.hapi/hapi-osgi-base

protected void applySuperStructureName(Message theMessage) throws HL7Exception {
  if (theMessage instanceof AbstractSuperMessage) {
    if (theMessage.getName() == null) {
      Terser t = new Terser(theMessage);
      String name = null;
      try {
        name = t.get("/MSH-9-3");
      } catch (HL7Exception e) {
        // ignore
      }
      
      if (StringUtil.isBlank(name)) {
        name = t.get("/MSH-9-1") + "_" + t.get("/MSH-9-2");
      }
      
      ((AbstractSuperMessage)theMessage).setName(name);
    }
  }
}

origin: ca.uhn.hapi/hapi-base

protected void applySuperStructureName(Message theMessage) throws HL7Exception {
  if (theMessage instanceof AbstractSuperMessage) {
    if (theMessage.getName() == null) {
      Terser t = new Terser(theMessage);
      String name = null;
      try {
        name = t.get("/MSH-9-3");
      } catch (HL7Exception e) {
        // ignore
      }
      
      if (StringUtil.isBlank(name)) {
        name = t.get("/MSH-9-1") + "_" + t.get("/MSH-9-2");
      }
      
      ((AbstractSuperMessage)theMessage).setName(name);
    }
  }
}

ca.uhn.hl7v2.modelMessagegetName

Popular methods of Message

  • get
  • getVersion
    Returns the version number of the HL7 version in which this message structure is defined (e.g. "2.4"
  • generateACK
    Generates and returns an ACK message which would be used to acknowledge this message successfully.
  • encode
    Encodes this message using the parser returned by #getParser()
  • getParser
    Returns the parser to be used when parse/encode methods are called on this Message, as well as its c
  • addNonstandardSegment
  • getEncodingCharactersValue
    Convenience method which retrieves the encoding characters value from the second field of the first
  • getFieldSeparatorValue
    Convenience method which retrieves the field separator value from the first field of the first segme
  • getNames
  • parse
    Parses the string into this message using the parser returned by #getParser()
  • printStructure
    Prints a summary of the contents and structure of this message. This is useful for debugging purpos
  • setParser
    Sets the parser to be used when parse/encode methods are called on this Message, as well as its chil
  • printStructure,
  • setParser

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • String (java.lang)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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