Package ca.uhn.hl7v2.model

Examples of ca.uhn.hl7v2.model.Structure


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

        Structure currentStructure = navigateToStructure(myCurrentDefinitionPath);

        clearNext();
        return currentStructure;
    }
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

        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

    public static boolean matchExistsAfterPosition(Position pos, String name, boolean firstDescendentsOnly, boolean upToFirstRequired) throws HL7Exception {
        boolean matchExists = false;
       
        //check next rep of self (if any)
        if (pos.parent.isRepeating(pos.index.name)) {           
            Structure s = pos.parent.get(pos.index.name, pos.index.rep);
            matchExists = contains(s, name, firstDescendentsOnly, upToFirstRequired);
        }
       
        //check later siblings (if any)
        if (!matchExists) {
View Full Code Here

        }
        childNames = ((SuperStructure) theStructure).getChildNamesForStructure(struct);
      }
     
      for (String nextName : childNames) {
        Structure nextChild = group.get(nextName);
        StructureDefinition structureDefinition = createStructureDefinition(nextChild, thePreviousLeaf, theStructureName);
        structureDefinition.setNameAsItAppearsInParent(nextName);
        structureDefinition.setRepeating(group.isRepeating(nextName));
        structureDefinition.setRequired(group.isRequired(nextName));
        structureDefinition.setChoiceElement(group.isChoiceElement(nextName));
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

        String newIndexName = "";
        int i=1;
        try  {
          for (i = 1; i < reps.size(); i++) {
            newIndexName = childName+(i+1);
            Structure st = groupObject.get(newIndexName);
            parseRep((Element) reps.get(i), st);
          }
        } catch(Throwable t) {
          log.info("Issue Parsing: " + t);
          newIndexName = groupObject.addNonstandardSegment(childName);
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

        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

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.