Class: Gerint::SolicitacaoInternacao
- Defined in:
- lib/gerint/servicos/solicitacao_internacao.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cartaoSus ⇒ Object
Returns the value of attribute cartaoSus.
-
#cidPrincipal ⇒ Object
Returns the value of attribute cidPrincipal.
-
#codigoEspecialidade ⇒ Object
Returns the value of attribute codigoEspecialidade.
-
#codigoMunicipio ⇒ Object
Returns the value of attribute codigoMunicipio.
-
#comorbidade1 ⇒ Object
Returns the value of attribute comorbidade1.
-
#comorbidade2 ⇒ Object
Returns the value of attribute comorbidade2.
-
#comorbidade3 ⇒ Object
Returns the value of attribute comorbidade3.
-
#condicao ⇒ Object
Returns the value of attribute condicao.
-
#cor ⇒ Object
Returns the value of attribute cor.
-
#cpfPaciente ⇒ Object
Returns the value of attribute cpfPaciente.
-
#cpfProfissionalSolicitante ⇒ Object
Returns the value of attribute cpfProfissionalSolicitante.
-
#dataHoraNascimento ⇒ Object
Returns the value of attribute dataHoraNascimento.
-
#dataSolicitacao ⇒ Object
Returns the value of attribute dataSolicitacao.
-
#debitoUrinario ⇒ Object
Returns the value of attribute debitoUrinario.
-
#dialise ⇒ Object
Returns the value of attribute dialise.
-
#endereco ⇒ Object
Returns the value of attribute endereco.
-
#fiO2 ⇒ Object
Returns the value of attribute fiO2.
-
#fluxo ⇒ Object
Returns the value of attribute fluxo.
-
#frequenciaCardiaca ⇒ Object
Returns the value of attribute frequenciaCardiaca.
-
#frequenciaRespiratoria ⇒ Object
Returns the value of attribute frequenciaRespiratoria.
-
#germe1 ⇒ Object
Returns the value of attribute germe1.
-
#germe2 ⇒ Object
Returns the value of attribute germe2.
-
#germe3 ⇒ Object
Returns the value of attribute germe3.
-
#germMulriresistente ⇒ Object
Returns the value of attribute germMulriresistente.
-
#idade ⇒ Object
Returns the value of attribute idade.
-
#internacaoPropria ⇒ Object
Returns the value of attribute internacaoPropria.
-
#isolamentoNecessario ⇒ Object
Returns the value of attribute isolamentoNecessario.
-
#justificativaInternacao ⇒ Object
Returns the value of attribute justificativaInternacao.
-
#nome ⇒ Object
Returns the value of attribute nome.
-
#numeroProtocoloOrigem ⇒ Object
Returns the value of attribute numeroProtocoloOrigem.
-
#peep ⇒ Object
Returns the value of attribute peep.
-
#possuiComorbidade ⇒ Object
Returns the value of attribute possuiComorbidade.
-
#pressaoArterialMaxima ⇒ Object
Returns the value of attribute pressaoArterialMaxima.
-
#pressaoArterialMinima ⇒ Object
Returns the value of attribute pressaoArterialMinima.
-
#procedimento ⇒ Object
Returns the value of attribute procedimento.
-
#satO2 ⇒ Object
Returns the value of attribute satO2.
-
#saturacaoO2 ⇒ Object
Returns the value of attribute saturacaoO2.
-
#sensorio ⇒ Object
Returns the value of attribute sensorio.
-
#sexo ⇒ Object
Returns the value of attribute sexo.
-
#sinaisSintomas ⇒ Object
Returns the value of attribute sinaisSintomas.
-
#suporteO2 ⇒ Object
Returns the value of attribute suporteO2.
-
#temperatura ⇒ Object
Returns the value of attribute temperatura.
-
#tipoAcesso ⇒ Object
Returns the value of attribute tipoAcesso.
-
#tipoInternacao ⇒ Object
Returns the value of attribute tipoInternacao.
-
#tipoLeito ⇒ Object
Returns the value of attribute tipoLeito.
-
#tipoProtocoloOrigem ⇒ Object
Returns the value of attribute tipoProtocoloOrigem.
Instance Method Summary collapse
-
#all_json ⇒ Object
Gera hash com todas as variaveis de instancia.
- #as_json(options = {}) ⇒ Object
- #to_json(*options) ⇒ Object
Methods inherited from Padrao
Instance Attribute Details
#cartaoSus ⇒ Object
Returns the value of attribute cartaoSus.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def cartaoSus @cartaoSus end |
#cidPrincipal ⇒ Object
Returns the value of attribute cidPrincipal.
6 7 8 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 6 def cidPrincipal @cidPrincipal end |
#codigoEspecialidade ⇒ Object
Returns the value of attribute codigoEspecialidade.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def codigoEspecialidade @codigoEspecialidade end |
#codigoMunicipio ⇒ Object
Returns the value of attribute codigoMunicipio.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def codigoMunicipio @codigoMunicipio end |
#comorbidade1 ⇒ Object
Returns the value of attribute comorbidade1.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def comorbidade1 @comorbidade1 end |
#comorbidade2 ⇒ Object
Returns the value of attribute comorbidade2.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def comorbidade2 @comorbidade2 end |
#comorbidade3 ⇒ Object
Returns the value of attribute comorbidade3.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def comorbidade3 @comorbidade3 end |
#condicao ⇒ Object
Returns the value of attribute condicao.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def condicao @condicao end |
#cor ⇒ Object
Returns the value of attribute cor.
7 8 9 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 7 def cor @cor end |
#cpfPaciente ⇒ Object
Returns the value of attribute cpfPaciente.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def cpfPaciente @cpfPaciente end |
#cpfProfissionalSolicitante ⇒ Object
Returns the value of attribute cpfProfissionalSolicitante.
6 7 8 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 6 def cpfProfissionalSolicitante @cpfProfissionalSolicitante end |
#dataHoraNascimento ⇒ Object
Returns the value of attribute dataHoraNascimento.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def dataHoraNascimento @dataHoraNascimento end |
#dataSolicitacao ⇒ Object
Returns the value of attribute dataSolicitacao.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def dataSolicitacao @dataSolicitacao end |
#debitoUrinario ⇒ Object
Returns the value of attribute debitoUrinario.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def debitoUrinario @debitoUrinario end |
#dialise ⇒ Object
Returns the value of attribute dialise.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def dialise @dialise end |
#endereco ⇒ Object
Returns the value of attribute endereco.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def endereco @endereco end |
#fiO2 ⇒ Object
Returns the value of attribute fiO2.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def fiO2 @fiO2 end |
#fluxo ⇒ Object
Returns the value of attribute fluxo.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def fluxo @fluxo end |
#frequenciaCardiaca ⇒ Object
Returns the value of attribute frequenciaCardiaca.
7 8 9 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 7 def frequenciaCardiaca @frequenciaCardiaca end |
#frequenciaRespiratoria ⇒ Object
Returns the value of attribute frequenciaRespiratoria.
7 8 9 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 7 def frequenciaRespiratoria @frequenciaRespiratoria end |
#germe1 ⇒ Object
Returns the value of attribute germe1.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def germe1 @germe1 end |
#germe2 ⇒ Object
Returns the value of attribute germe2.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def germe2 @germe2 end |
#germe3 ⇒ Object
Returns the value of attribute germe3.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def germe3 @germe3 end |
#germMulriresistente ⇒ Object
Returns the value of attribute germMulriresistente.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def germMulriresistente @germMulriresistente end |
#idade ⇒ Object
Returns the value of attribute idade.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def idade @idade end |
#internacaoPropria ⇒ Object
Returns the value of attribute internacaoPropria.
6 7 8 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 6 def internacaoPropria @internacaoPropria end |
#isolamentoNecessario ⇒ Object
Returns the value of attribute isolamentoNecessario.
10 11 12 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 10 def isolamentoNecessario @isolamentoNecessario end |
#justificativaInternacao ⇒ Object
Returns the value of attribute justificativaInternacao.
7 8 9 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 7 def justificativaInternacao @justificativaInternacao end |
#nome ⇒ Object
Returns the value of attribute nome.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def nome @nome end |
#numeroProtocoloOrigem ⇒ Object
Returns the value of attribute numeroProtocoloOrigem.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def numeroProtocoloOrigem @numeroProtocoloOrigem end |
#peep ⇒ Object
Returns the value of attribute peep.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def peep @peep end |
#possuiComorbidade ⇒ Object
Returns the value of attribute possuiComorbidade.
11 12 13 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 11 def possuiComorbidade @possuiComorbidade end |
#pressaoArterialMaxima ⇒ Object
Returns the value of attribute pressaoArterialMaxima.
7 8 9 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 7 def pressaoArterialMaxima @pressaoArterialMaxima end |
#pressaoArterialMinima ⇒ Object
Returns the value of attribute pressaoArterialMinima.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def pressaoArterialMinima @pressaoArterialMinima end |
#procedimento ⇒ Object
Returns the value of attribute procedimento.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def procedimento @procedimento end |
#satO2 ⇒ Object
Returns the value of attribute satO2.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def satO2 @satO2 end |
#saturacaoO2 ⇒ Object
Returns the value of attribute saturacaoO2.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def saturacaoO2 @saturacaoO2 end |
#sensorio ⇒ Object
Returns the value of attribute sensorio.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def sensorio @sensorio end |
#sexo ⇒ Object
Returns the value of attribute sexo.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def sexo @sexo end |
#sinaisSintomas ⇒ Object
Returns the value of attribute sinaisSintomas.
6 7 8 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 6 def sinaisSintomas @sinaisSintomas end |
#suporteO2 ⇒ Object
Returns the value of attribute suporteO2.
9 10 11 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 9 def suporteO2 @suporteO2 end |
#temperatura ⇒ Object
Returns the value of attribute temperatura.
8 9 10 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 8 def temperatura @temperatura end |
#tipoAcesso ⇒ Object
Returns the value of attribute tipoAcesso.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def tipoAcesso @tipoAcesso end |
#tipoInternacao ⇒ Object
Returns the value of attribute tipoInternacao.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def tipoInternacao @tipoInternacao end |
#tipoLeito ⇒ Object
Returns the value of attribute tipoLeito.
6 7 8 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 6 def tipoLeito @tipoLeito end |
#tipoProtocoloOrigem ⇒ Object
Returns the value of attribute tipoProtocoloOrigem.
5 6 7 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 5 def tipoProtocoloOrigem @tipoProtocoloOrigem end |
Instance Method Details
#all_json ⇒ Object
Gera hash com todas as variaveis de instancia
64 65 66 67 68 69 70 71 72 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 64 def all_json # Gera hash com todas as variaveis de instancia vinstancia = self.instance_variables h = {} vinstancia.each do |v| h.store(v[1..50], "#{v}") # BUG: v contem o nome da variavel e não o valor int end h h.to_json end |
#as_json(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 13 def as_json(={}) h = { cartaoSus: @cartaoSus, cpfPaciente: @cpfPaciente, tipoInternacao: @tipoInternacao, numeroProtocoloOrigem: @numeroProtocoloOrigem, tipoProtocoloOrigem: @tipoProtocoloOrigem, internacaoPropria: @internacaoPropria, tipoLeito: @tipoLeito, cidPrincipal: @cidPrincipal, cpfProfissionalSolicitante: @cpfProfissionalSolicitante, sinaisSintomas: @sinaisSintomas, justificativaInternacao: @justificativaInternacao } h.store(:tipoAcesso, @tipoAcesso) unless @tipoAcesso.nil? h.store(:cor, @cor) unless @cor.nil? h.store(:frequenciaCardiaca, @frequenciaCardiaca) unless @frequenciaCardiaca.nil? h.store(:frequenciaRespiratoria, @frequenciaRespiratoria) unless @frequenciaRespiratoria.nil? h.store(:pressaoArterialMaxima, @pressaoArterialMaxima) unless @pressaoArterialMaxima.nil? h.store(:pressaoArterialMinima, @pressaoArterialMinima) unless @pressaoArterialMinima.nil? h.store(:temperatura, @temperatura) unless @temperatura.nil? h.store(:saturacaoO2, @saturacaoO2) unless @saturacaoO2.nil? h.store(:sensorio, @sensorio) unless @sensorio.nil? h.store(:debitoUrinario, @debitoUrinario) unless @debitoUrinario.nil? h.store(:procedimento, @procedimento) unless @procedimento.nil? h.store(:dialise, @dialise) unless @dialise.nil? h.store(:suporteO2, @suporteO2) unless @suporteO2.nil? h.store(:fluxo, @fluxo) unless @fluxo.nil? h.store(:fiO2, @fiO2) unless @fiO2.nil? h.store(:satO2, @satO2) unless @satO2.nil? h.store(:peep, @peep) unless @peep.nil? h.store(:condicao, @condicao) unless @condicao.nil? h.store(:nome, @nome) unless @nome.nil? h.store(:sexo, @sexo) unless @sexo.nil? h.store(:idade, @idade) unless @idade.nil? h.store(:condigoMunicipio, @codigoMunicipio) unless @codigoMunicipio.nil? h.store(:endereco, @endereco) unless @endereco.nil? h.store(:codigoEspecialidade, @codigoEspecialiade) unless @codigoEspecialidade.nil? h.store(:isolamentoNecessario, @isolamentoNecessario) unless @isolamentoNecessario.nil? h.store(:germe1, @germe1) unless @germe1.nil? h.store(:germe2, @germe2) unless @germe2.nil? h.store(:germe3, @germe3) unless @germe3.nil? h.store(:germeMultiresistente, @germeMultiresistente) unless @germeMultiresistente.nil? h.store(:possuiComorbidade, @possuiComorbidade) unless @possuiComorbidade.nil? h.store(:comorbidade1, @comorbidade1) unless @comorbidade1.nil? h.store(:comorbidade2, @comorbidade2) unless @comorbidade2.nil? h.store(:comorbidade3, @comorbidade3) unless @comorbidade3.nil? h.store(:dataHoraNascimento, @dataHoraNascimento) unless @dataHoraNascimento.nil? h.store(:dataSolicitacao, @dataSolicitacao) unless @dataSolicitacao.nil? h end |
#to_json(*options) ⇒ Object
74 75 76 |
# File 'lib/gerint/servicos/solicitacao_internacao.rb', line 74 def to_json(*) as_json(*).to_json(*) end |