예제 #1
0
 function __construct(CHL7v2SegmentGroup $parent, CHL7v2DOMElement $self_specs)
 {
     parent::__construct($parent);
     $this->parent = $parent;
     $this->specs = $self_specs;
     $name = $self_specs->getAttribute("name");
     $segments = $self_specs->query(".//segment");
     $values = array();
     foreach ($segments as $_segment) {
         $values[] = $_segment->nodeValue;
     }
     $this->name = $name ? $name : implode(" ", $values);
     $parent->appendChild($this);
 }
 function __construct(CHL7v2Entity $parent, CHL7v2DOMElement $specs, $self_pos, $separators)
 {
     parent::__construct();
     $this->parent = $parent;
     // Separators stack
     $this->separator = array_shift($separators);
     $this->separators = $separators;
     // Intrinsic properties
     $this->length = (int) $specs->getAttribute("length");
     $this->table = (int) $specs->getAttribute("table");
     $this->datatype = $specs->queryTextNode("datatype");
     $this->description = $specs->queryTextNode("description");
     $this->self_pos = $self_pos;
 }
 function __construct(CHL7v2Segment $segment, CHL7v2DOMElement $spec)
 {
     parent::__construct($segment);
     $this->owner_segment = $segment;
     $this->name = $spec->queryTextNode("name");
     $this->datatype = $spec->queryTextNode("datatype");
     $this->length = (int) $spec->getAttribute("length");
     $this->table = (int) $spec->getAttribute("table");
     $this->meta_spec = $spec;
     /*if ($this->datatype == "TS") {
         $this->datatype = "DTM";
       }*/
     $this->description = $spec->queryTextNode("description");
     $this->required = $spec->isRequired();
     $this->forbidden = $spec->isForbidden();
     $this->unbounded = $spec->isUnbounded();
 }
예제 #4
0
 function handleLine(CHL7v2DOMElement $current_node, CHL7v2Entity $current_group)
 {
     // Increment du nb d'occurences
     $current_node->markUsed();
     // On enregistre le segment dans le groupe courant
     $_segment = new CHL7v2Segment($current_group);
     $_segment->parse($this->getCurrentLine());
     $current_group->appendChild($_segment);
     // On avance dans le fichier
     $this->current_line++;
     CHL7v2::d(" --> ### Creation du segment ###, ligne suivante : {$this->current_line}");
 }