Tabnine Logo
MessageRule
Code IndexAdd Tabnine to your IDE (free)

How to use
MessageRule
in
ca.uhn.hl7v2.validation

Best Java code snippets using ca.uhn.hl7v2.validation.MessageRule (Showing top 2 results out of 315)

origin: ca.uhn.hapi/hapi-base

private void testMessageRules(Message message, ValidationExceptionHandler<R> handler)
    throws HL7Exception {
  Terser t = new Terser(message);
  String messageType = t.get("MSH-9-1");
  String triggerEvent = t.get("MSH-9-2");
  List<MessageRule> rules = new ArrayList<MessageRule>();
  if (getValidationContext() != null) {
    rules.addAll(getValidationContext().getMessageRules(message.getVersion(), messageType,
        triggerEvent));
  }
  LOG.debug("Validating message against {} message rules", rules.size());
  for (MessageRule rule : rules) {
    ValidationException[] ex = rule.apply(message);
    if (ex != null && ex.length > 0) {
      handler.onExceptions(ex);
    }
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

private void testMessageRules(Message message, ValidationExceptionHandler<R> handler)
    throws HL7Exception {
  Terser t = new Terser(message);
  String messageType = t.get("MSH-9-1");
  String triggerEvent = t.get("MSH-9-2");
  List<MessageRule> rules = new ArrayList<MessageRule>();
  if (getValidationContext() != null) {
    rules.addAll(getValidationContext().getMessageRules(message.getVersion(), messageType,
        triggerEvent));
  }
  LOG.debug("Validating message against {} message rules", rules.size());
  for (MessageRule rule : rules) {
    ValidationException[] ex = rule.apply(message);
    if (ex != null && ex.length > 0) {
      handler.onExceptions(ex);
    }
  }
}
ca.uhn.hl7v2.validationMessageRule

Javadoc

A validation rule that applies to a fully populated message object. Message rules may be called (depending on runtime configuration) just after an inbound message is parsed, or just before an outbound message is encoded.

Most used methods

  • apply

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • String (java.lang)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • CodeWhisperer alternatives
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