Package ca.uhn.hl7v2.model

Examples of ca.uhn.hl7v2.model.Structure


                    if (ce != null) exList.add(ce);
                   
                    //test children on instances with content
                    if (validateChildren) {
                      for (int j = 0; j < instancesWithContent.size(); j++) {
                          Structure s = (Structure) instancesWithContent.get(j);
                          HL7Exception[] childExceptions = testStructure(s, struct, profileID);
                          addToList(childExceptions, exList);
                      }
                    }
                   
View Full Code Here


    public Structure next() {
        if (!hasNext()) {
            throw new NoSuchElementException("No more nodes in message");
        }
       
        Structure next = myRemaining.remove(myRemaining.size() - 1);
       
        if (next instanceof Group) {
            addChildren((Group) next);
        }
       
View Full Code Here

                    if (ce != null) exList.add(ce);
                   
                    //test children on instances with content
                    if (theValidateChildren) {
                      for (int j = 0; j < instancesWithContent.size(); j++) {
                          Structure s = (Structure) instancesWithContent.get(j);
                          HL7Exception[] childExceptions = testStructure(s, struct, profileID);
                          addToList(childExceptions, exList);
                      }
                    }
                   
View Full Code Here

        if (theStructure instanceof Group) {
            retVal.setSegment(false);
            Group group = (Group) theStructure;
            int index = 0;
            for (String nextName : group.getNames()) {
                Structure nextChild = group.get(nextName);
                StructureDefinition structureDefinition = createStructureDefinition(nextChild, thePreviousLeaf);
                structureDefinition.setNameAsItAppearsInParent(nextName);
                structureDefinition.setRepeating(group.isRepeating(nextName));
                structureDefinition.setRequired(group.isRequired(nextName));
                structureDefinition.setPosition(index++);
View Full Code Here

    public Structure next() {
        if (!hasNext()) {
            throw new NoSuchElementException("No more nodes in message");
        }

        Structure currentStructure = navigateToStructure(myCurrentDefinitionPath);

        clearNext();
        return currentStructure;
    }
View Full Code Here

        String newIndexName = "";
        int i=1;
        try  {
          for (i = 1; i < reps.size(); i++) {
            newIndexName = childName+(i+1);
            Structure st = groupObject.get(newIndexName);
            parseRep(reps.get(i), st);
          }
        } catch(Throwable t) {
          log.info("Issue Parsing: " + t);
          newIndexName = groupObject.addNonstandardSegment(childName);
View Full Code Here

        clearNext();
        return currentStructure;
    }

    private Structure navigateToStructure(List<Position> theDefinitionPath) throws Error {
        Structure currentStructure = null;
        for (Position next : theDefinitionPath) {
            if (currentStructure == null) {
                currentStructure = myMessage;
            } else {
                try {
View Full Code Here

          1,
          "No appropriate destination could be found to which this message could be routed.");
      // this is max length

      // populate ERR segment if it exists (may not depending on version)
      Structure s = ack.get("ERR");
      if (s != null) {
        Segment err = (Segment) s;
        Terser.set(err, 1, 0, 4, 1, "207");
        Terser.set(err, 1, 0, 4, 2, "Application Internal Error");
        Terser.set(err, 1, 0, 4, 3, "HL70357");
View Full Code Here

                log.debug("Parsing segment {}", name);

                messageIter.setDirection(name);
                FilterIterator.Predicate<Structure> byDirection = new FilterIterator.Predicate<Structure>() {
                    public boolean evaluate(Structure obj) {
                        Structure s = (Structure) obj;
                        log.debug("PipeParser iterating message in direction {} at {} ", name, s.getName());
                        return s.getName().matches(name + "\\d*");
                    }
                };
                FilterIterator<Structure> dirIter = new FilterIterator<Structure>(segmentIter, byDirection);
                if (dirIter.hasNext()) {
                    parse((Segment) dirIter.next(), segments[i], getEncodingChars(string));
View Full Code Here

                log.debug("Parsing segment {}", name);

                messageIter.setDirection(name);
                FilterIterator.Predicate<Structure> byDirection = new FilterIterator.Predicate<Structure>() {
                    public boolean evaluate(Structure obj) {
                        Structure s = (Structure) obj;
                        log.debug("PipeParser iterating message in direction {} at {} ", name, s.getName());
                        return s.getName().matches(name + "\\d*");
                    }
                };
                FilterIterator<Structure> dirIter = new FilterIterator<Structure>(segmentIter, byDirection);
                if (dirIter.hasNext()) {
                    parse((Segment) dirIter.next(), segments[i], getEncodingChars(string));
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.model.Structure

Copyright © 2018 www.massapicom. 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.