Esempio n. 1
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->uuidFicha);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->headerTransport = new \br\gov\saude\esusab\ras\common\VariasLotacoesHeaderThrift();
                     $xfer += $this->headerTransport->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::LST) {
                     $this->atendimentosOdontologicos = array();
                     $_size42 = 0;
                     $_etype45 = 0;
                     $xfer += $input->readListBegin($_etype45, $_size42);
                     for ($_i46 = 0; $_i46 < $_size42; ++$_i46) {
                         $elem47 = null;
                         $elem47 = new \br\gov\saude\esusab\ras\atendodonto\FichaAtendimentoOdontologicoChildThrift();
                         $xfer += $elem47->read($input);
                         $this->atendimentosOdontologicos[] = $elem47;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->tpCdsOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Esempio n. 2
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->uuidFicha);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->tpCdsOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cnsCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeSocialCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->dataNascimentoCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->sexoCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->racaCorCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeMaeCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->desconheceNomeMae);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->codigoIbgeMunicipioNascimento);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->nacionalidadeCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->emailCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 15:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->numeroNisPisPasep);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 16:
                 if ($ftype == TType::STRUCT) {
                     $this->endereco = new \br\gov\saude\esusab\ras\common\EnderecoLocalPermanenciaThrift();
                     $xfer += $this->endereco->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 17:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->atencaoDomiciliarProcedencia);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 18:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->atencaoDomiciliarModalidade);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 19:
                 if ($ftype == TType::LST) {
                     $this->condicoesAvaliadas = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $xfer += $input->readI64($elem5);
                         $this->condicoesAvaliadas[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 20:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10Principal);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 21:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10SecundarioUm);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 22:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10SecundarioDois);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 23:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->conclusaoDestinoElegivel);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 24:
                 if ($ftype == TType::LST) {
                     $this->conclusaoDestinoInelegivel = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $xfer += $input->readI64($elem11);
                         $this->conclusaoDestinoInelegivel[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 25:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->cuidadorCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 26:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->turno);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 27:
                 if ($ftype == TType::STRUCT) {
                     $this->headerTransport = new \br\gov\saude\esusab\ras\common\VariasLotacoesHeaderThrift();
                     $xfer += $this->headerTransport->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 28:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomePaiCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 29:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->desconheceNomePai);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 30:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->dtNaturalizacao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 31:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->portariaNaturalizacao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 32:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->dtEntradaBrasil);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 33:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->paisNascimento);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 34:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->etnia);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 35:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cnsCuidador);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Esempio n. 3
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->uuidFicha);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->tpCdsOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::LST) {
                     $this->atendimentosDomiciliares = array();
                     $_size21 = 0;
                     $_etype24 = 0;
                     $xfer += $input->readListBegin($_etype24, $_size21);
                     for ($_i25 = 0; $_i25 < $_size21; ++$_i25) {
                         $elem26 = null;
                         $elem26 = new \br\gov\saude\esusab\ras\atenddomiciliar\FichaAtendimentoDomiciliarChildThrift();
                         $xfer += $elem26->read($input);
                         $this->atendimentosDomiciliares[] = $elem26;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::STRUCT) {
                     $this->headerTransport = new \br\gov\saude\esusab\ras\common\VariasLotacoesHeaderThrift();
                     $xfer += $this->headerTransport->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }