Exemplo n.º 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('FichaAvaliacaoElegibilidadeThrift');
     if ($this->uuidFicha !== null) {
         $xfer += $output->writeFieldBegin('uuidFicha', TType::STRING, 1);
         $xfer += $output->writeString($this->uuidFicha);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->tpCdsOrigem !== null) {
         $xfer += $output->writeFieldBegin('tpCdsOrigem', TType::I32, 2);
         $xfer += $output->writeI32($this->tpCdsOrigem);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cnsCidadao !== null) {
         $xfer += $output->writeFieldBegin('cnsCidadao', TType::STRING, 4);
         $xfer += $output->writeString($this->cnsCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->nomeCidadao !== null) {
         $xfer += $output->writeFieldBegin('nomeCidadao', TType::STRING, 5);
         $xfer += $output->writeString($this->nomeCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->nomeSocialCidadao !== null) {
         $xfer += $output->writeFieldBegin('nomeSocialCidadao', TType::STRING, 6);
         $xfer += $output->writeString($this->nomeSocialCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->dataNascimentoCidadao !== null) {
         $xfer += $output->writeFieldBegin('dataNascimentoCidadao', TType::I64, 7);
         $xfer += $output->writeI64($this->dataNascimentoCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->sexoCidadao !== null) {
         $xfer += $output->writeFieldBegin('sexoCidadao', TType::I64, 8);
         $xfer += $output->writeI64($this->sexoCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->racaCorCidadao !== null) {
         $xfer += $output->writeFieldBegin('racaCorCidadao', TType::I64, 9);
         $xfer += $output->writeI64($this->racaCorCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->nomeMaeCidadao !== null) {
         $xfer += $output->writeFieldBegin('nomeMaeCidadao', TType::STRING, 10);
         $xfer += $output->writeString($this->nomeMaeCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->desconheceNomeMae !== null) {
         $xfer += $output->writeFieldBegin('desconheceNomeMae', TType::BOOL, 11);
         $xfer += $output->writeBool($this->desconheceNomeMae);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->codigoIbgeMunicipioNascimento !== null) {
         $xfer += $output->writeFieldBegin('codigoIbgeMunicipioNascimento', TType::STRING, 12);
         $xfer += $output->writeString($this->codigoIbgeMunicipioNascimento);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->nacionalidadeCidadao !== null) {
         $xfer += $output->writeFieldBegin('nacionalidadeCidadao', TType::I64, 13);
         $xfer += $output->writeI64($this->nacionalidadeCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->emailCidadao !== null) {
         $xfer += $output->writeFieldBegin('emailCidadao', TType::STRING, 14);
         $xfer += $output->writeString($this->emailCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->numeroNisPisPasep !== null) {
         $xfer += $output->writeFieldBegin('numeroNisPisPasep', TType::STRING, 15);
         $xfer += $output->writeString($this->numeroNisPisPasep);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->endereco !== null) {
         if (!is_object($this->endereco)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('endereco', TType::STRUCT, 16);
         $xfer += $this->endereco->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->atencaoDomiciliarProcedencia !== null) {
         $xfer += $output->writeFieldBegin('atencaoDomiciliarProcedencia', TType::I64, 17);
         $xfer += $output->writeI64($this->atencaoDomiciliarProcedencia);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->atencaoDomiciliarModalidade !== null) {
         $xfer += $output->writeFieldBegin('atencaoDomiciliarModalidade', TType::I64, 18);
         $xfer += $output->writeI64($this->atencaoDomiciliarModalidade);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->condicoesAvaliadas !== null) {
         if (!is_array($this->condicoesAvaliadas)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('condicoesAvaliadas', TType::LST, 19);
         $output->writeListBegin(TType::I64, count($this->condicoesAvaliadas));
         foreach ($this->condicoesAvaliadas as $iter12) {
             $xfer += $output->writeI64($iter12);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cid10Principal !== null) {
         $xfer += $output->writeFieldBegin('cid10Principal', TType::STRING, 20);
         $xfer += $output->writeString($this->cid10Principal);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cid10SecundarioUm !== null) {
         $xfer += $output->writeFieldBegin('cid10SecundarioUm', TType::STRING, 21);
         $xfer += $output->writeString($this->cid10SecundarioUm);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cid10SecundarioDois !== null) {
         $xfer += $output->writeFieldBegin('cid10SecundarioDois', TType::STRING, 22);
         $xfer += $output->writeString($this->cid10SecundarioDois);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->conclusaoDestinoElegivel !== null) {
         $xfer += $output->writeFieldBegin('conclusaoDestinoElegivel', TType::I64, 23);
         $xfer += $output->writeI64($this->conclusaoDestinoElegivel);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->conclusaoDestinoInelegivel !== null) {
         if (!is_array($this->conclusaoDestinoInelegivel)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('conclusaoDestinoInelegivel', TType::LST, 24);
         $output->writeListBegin(TType::I64, count($this->conclusaoDestinoInelegivel));
         foreach ($this->conclusaoDestinoInelegivel as $iter13) {
             $xfer += $output->writeI64($iter13);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cuidadorCidadao !== null) {
         $xfer += $output->writeFieldBegin('cuidadorCidadao', TType::I64, 25);
         $xfer += $output->writeI64($this->cuidadorCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->turno !== null) {
         $xfer += $output->writeFieldBegin('turno', TType::I64, 26);
         $xfer += $output->writeI64($this->turno);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->headerTransport !== null) {
         if (!is_object($this->headerTransport)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('headerTransport', TType::STRUCT, 27);
         $xfer += $this->headerTransport->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->nomePaiCidadao !== null) {
         $xfer += $output->writeFieldBegin('nomePaiCidadao', TType::STRING, 28);
         $xfer += $output->writeString($this->nomePaiCidadao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->desconheceNomePai !== null) {
         $xfer += $output->writeFieldBegin('desconheceNomePai', TType::BOOL, 29);
         $xfer += $output->writeBool($this->desconheceNomePai);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->dtNaturalizacao !== null) {
         $xfer += $output->writeFieldBegin('dtNaturalizacao', TType::I64, 30);
         $xfer += $output->writeI64($this->dtNaturalizacao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->portariaNaturalizacao !== null) {
         $xfer += $output->writeFieldBegin('portariaNaturalizacao', TType::STRING, 31);
         $xfer += $output->writeString($this->portariaNaturalizacao);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->dtEntradaBrasil !== null) {
         $xfer += $output->writeFieldBegin('dtEntradaBrasil', TType::I64, 32);
         $xfer += $output->writeI64($this->dtEntradaBrasil);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->paisNascimento !== null) {
         $xfer += $output->writeFieldBegin('paisNascimento', TType::I64, 33);
         $xfer += $output->writeI64($this->paisNascimento);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->etnia !== null) {
         $xfer += $output->writeFieldBegin('etnia', TType::I64, 34);
         $xfer += $output->writeI64($this->etnia);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->cnsCuidador !== null) {
         $xfer += $output->writeFieldBegin('cnsCuidador', TType::STRING, 35);
         $xfer += $output->writeString($this->cnsCuidador);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Exemplo n.º 2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('FichaAtendimentoOdontologicoMasterThrift');
     if ($this->uuidFicha !== null) {
         $xfer += $output->writeFieldBegin('uuidFicha', TType::STRING, 1);
         $xfer += $output->writeString($this->uuidFicha);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->headerTransport !== null) {
         if (!is_object($this->headerTransport)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('headerTransport', TType::STRUCT, 2);
         $xfer += $this->headerTransport->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->atendimentosOdontologicos !== null) {
         if (!is_array($this->atendimentosOdontologicos)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('atendimentosOdontologicos', TType::LST, 3);
         $output->writeListBegin(TType::STRUCT, count($this->atendimentosOdontologicos));
         foreach ($this->atendimentosOdontologicos as $iter48) {
             $xfer += $iter48->write($output);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->tpCdsOrigem !== null) {
         $xfer += $output->writeFieldBegin('tpCdsOrigem', TType::I32, 4);
         $xfer += $output->writeI32($this->tpCdsOrigem);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }