tiss-ruby 0.1.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +10 -10
- data/lib/tiss/constants.rb +28 -1
- data/lib/tiss/tiss.rb +3 -2
- data/lib/tiss/utils.rb +28 -0
- data/lib/tiss/version.rb +1 -1
- data/lib/tiss/{creator.rb → xml_creator.rb} +2 -2
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a99ba225352436a46af77697b4d6cc26dc0abe8a
|
4
|
+
data.tar.gz: 061d639e8b2d21726acc10d6e8d13b1066663128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6e2d1df750872f81ef522b322b150cae5f9773833ae9a1521bd32cb12fb1e0829c4782a48d47646f48aa28ebfe203e480569f8a01a8f3713a80aef3a8fd3b82
|
7
|
+
data.tar.gz: 00d8eb419ab75ea2f4609caaccb582b8ccfb2eb7b91990d5fef87c8f18820acced3e9d2d28587c9461d7dd61795f5da6546a90081ef9ddca06a2c856a0927a05
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tiss-ruby (0.
|
4
|
+
tiss-ruby (0.2.2)
|
5
5
|
activemodel
|
6
6
|
activesupport
|
7
7
|
dry-configurable
|
@@ -10,9 +10,9 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (5.2.
|
14
|
-
activesupport (= 5.2.
|
15
|
-
activesupport (5.2.
|
13
|
+
activemodel (5.2.7.1)
|
14
|
+
activesupport (= 5.2.7.1)
|
15
|
+
activesupport (5.2.7.1)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 0.7, < 2)
|
18
18
|
minitest (~> 5.1)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
binding_of_caller (0.8.0)
|
23
23
|
debug_inspector (>= 0.0.1)
|
24
24
|
coderay (1.1.2)
|
25
|
-
concurrent-ruby (1.1.
|
25
|
+
concurrent-ruby (1.1.10)
|
26
26
|
coolline (0.5.0)
|
27
27
|
unicode_utils (~> 1.4)
|
28
28
|
debug_inspector (0.0.3)
|
@@ -32,14 +32,14 @@ GEM
|
|
32
32
|
dry-core (~> 0.4, >= 0.4.7)
|
33
33
|
dry-core (0.4.9)
|
34
34
|
concurrent-ruby (~> 1.0)
|
35
|
-
i18n (1.
|
35
|
+
i18n (1.10.0)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
interception (0.5)
|
38
38
|
jaro_winkler (1.5.4)
|
39
39
|
method_source (0.9.2)
|
40
40
|
mini_portile2 (2.4.0)
|
41
|
-
minitest (5.
|
42
|
-
nokogiri (1.10.
|
41
|
+
minitest (5.15.0)
|
42
|
+
nokogiri (1.10.10)
|
43
43
|
mini_portile2 (~> 2.4.0)
|
44
44
|
parallel (1.19.1)
|
45
45
|
parser (2.7.0.2)
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
rubocop (>= 0.68.1)
|
85
85
|
ruby-progressbar (1.10.1)
|
86
86
|
thread_safe (0.3.6)
|
87
|
-
tzinfo (1.2.
|
87
|
+
tzinfo (1.2.9)
|
88
88
|
thread_safe (~> 0.1)
|
89
89
|
unicode-display_width (1.6.1)
|
90
90
|
unicode_utils (1.4.0)
|
@@ -108,4 +108,4 @@ DEPENDENCIES
|
|
108
108
|
tiss-ruby!
|
109
109
|
|
110
110
|
BUNDLED WITH
|
111
|
-
1.
|
111
|
+
1.17.3
|
data/lib/tiss/constants.rb
CHANGED
@@ -66,8 +66,35 @@ module Tiss
|
|
66
66
|
'3.03.01' => CR_TYPE_MAP_V3,
|
67
67
|
'3.03.02' => CR_TYPE_MAP_V3,
|
68
68
|
'3.03.03' => CR_TYPE_MAP_V3,
|
69
|
-
'3.04.00' => CR_TYPE_MAP_V3
|
69
|
+
'3.04.00' => CR_TYPE_MAP_V3,
|
70
|
+
'3.05.00' => CR_TYPE_MAP_V3
|
70
71
|
}
|
71
72
|
|
73
|
+
ENVIO_LOTE_GUIAS = "ENVIO_LOTE_GUIAS"
|
74
|
+
ENVIO_ANEXO = "ENVIO_ANEXO"
|
75
|
+
SOLIC_DEMONSTRATIVO_RETORNO = "SOLIC_DEMONSTRATIVO_RETORNO"
|
76
|
+
SOLIC_STATUS_PROTOCOLO = "SOLIC_STATUS_PROTOCOLO"
|
77
|
+
SOLICITACAO_PROCEDIMENTOS = "SOLICITACAO_PROCEDIMENTOS"
|
78
|
+
SOLICITA_STATUS_AUTORIZACAO = "SOLICITA_STATUS_AUTORIZACAO"
|
79
|
+
VERIFICA_ELEGIBILIDADE = "VERIFICA_ELEGIBILIDADE"
|
80
|
+
CANCELA_GUIA = "CANCELA_GUIA"
|
81
|
+
COMUNICACAO_BENEFICIARIO = "COMUNICACAO_BENEFICIARIO"
|
82
|
+
RECURSO_GLOSA = "RECURSO_GLOSA"
|
83
|
+
SOLIC_STATUS_RECURSO_GLOSA = "SOLIC_STATUS_RECURSO_GLOSA"
|
84
|
+
PROTOCOLO_RECEBIMENTO = "PROTOCOLO_RECEBIMENTO"
|
85
|
+
PROTOCOLO_RECEBIMENTO_ANEXO = "PROTOCOLO_RECEBIMENTO_ANEXO"
|
86
|
+
RECEBIMENTO_RECURSO_GLOSA = "RECEBIMENTO_RECURSO_GLOSA"
|
87
|
+
DEMONSTRATIVO_ANALISE_CONTA = "DEMONSTRATIVO_ANALISE_CONTA"
|
88
|
+
DEMONSTRATIVO_PAGAMENTO = "DEMONSTRATIVO_PAGAMENTO"
|
89
|
+
DEMONSTRATIVO_ODONTOLOGIA = "DEMONSTRATIVO_ODONTOLOGIA"
|
90
|
+
SITUACAO_PROTOCOLO = "SITUACAO_PROTOCOLO"
|
91
|
+
RESPOSTA_SOLICITACAO = "RESPOSTA_SOLICITACAO"
|
92
|
+
AUTORIZACAO_ODONTOLOGIA = "AUTORIZACAO_ODONTOLOGIA"
|
93
|
+
STATUS_AUTORIZACAO = "STATUS_AUTORIZACAO"
|
94
|
+
SITUACAO_ELEGIBILIDADE = "SITUACAO_ELEGIBILIDADE"
|
95
|
+
CANCELAMENTO_GUIA_RECIBO = "CANCELAMENTO_GUIA_RECIBO"
|
96
|
+
RECIBO_COMUNICACAO = "RECIBO_COMUNICACAO"
|
97
|
+
RESPOSTA_RECURSO_GLOSA = "RESPOSTA_RECURSO_GLOSA"
|
98
|
+
|
72
99
|
end
|
73
100
|
end
|
data/lib/tiss/tiss.rb
CHANGED
@@ -8,7 +8,8 @@ require_relative 'constants'
|
|
8
8
|
require_relative 'xsd/convert'
|
9
9
|
require_relative 'generator/generator'
|
10
10
|
require_relative 'model'
|
11
|
-
require_relative '
|
11
|
+
require_relative 'utils'
|
12
|
+
require_relative 'xml_creator'
|
12
13
|
|
13
14
|
|
14
15
|
Dir[File.join(__dir__, 'models', '*.rb')].sort.each { |file| require file }
|
@@ -17,7 +18,7 @@ module Tiss
|
|
17
18
|
extend Dry::Configurable
|
18
19
|
|
19
20
|
setting :default_version, '3_02_00'
|
20
|
-
setting :available_versions, %w[3_02_00 3_02_01 3_02_02 3_03_01 3_03_02 3_03_03 3_04_00]
|
21
|
+
setting :available_versions, %w[3_02_00 3_02_01 3_02_02 3_03_01 3_03_02 3_03_03 3_04_00 3_05_00]
|
21
22
|
|
22
23
|
# TODO: Refactor this
|
23
24
|
class ConvertFromXsd
|
data/lib/tiss/utils.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
module Tiss
|
2
|
+
module Utils
|
3
|
+
class << self
|
4
|
+
|
5
|
+
def join_data(tiss_batch, model)
|
6
|
+
data = ''
|
7
|
+
model.attributes_by(tiss_batch.xml_version).to_h.values.each do |value|
|
8
|
+
next unless value.present?
|
9
|
+
|
10
|
+
if value.is_a? Tiss::Model::Base
|
11
|
+
data << join_data(tiss_batch, value)
|
12
|
+
next
|
13
|
+
end
|
14
|
+
if value.is_a? Array
|
15
|
+
data << value.map do |inner_value|
|
16
|
+
join_data(tiss_batch, inner_value)
|
17
|
+
end.join
|
18
|
+
next
|
19
|
+
end
|
20
|
+
|
21
|
+
data << value.to_s
|
22
|
+
end
|
23
|
+
data
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/tiss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiss-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Junior
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -263,7 +263,6 @@ files:
|
|
263
263
|
- bin/setup
|
264
264
|
- lib/tiss-ruby.rb
|
265
265
|
- lib/tiss/constants.rb
|
266
|
-
- lib/tiss/creator.rb
|
267
266
|
- lib/tiss/generator/generator.rb
|
268
267
|
- lib/tiss/generator/generators/base_generator.rb
|
269
268
|
- lib/tiss/generator/generators/model_generator.rb
|
@@ -505,7 +504,9 @@ files:
|
|
505
504
|
- lib/tiss/models/total_liquido_por_data.rb
|
506
505
|
- lib/tiss/models/tratamentos_anteriores.rb
|
507
506
|
- lib/tiss/tiss.rb
|
507
|
+
- lib/tiss/utils.rb
|
508
508
|
- lib/tiss/version.rb
|
509
|
+
- lib/tiss/xml_creator.rb
|
509
510
|
- lib/tiss/xsd/class_maker.rb
|
510
511
|
- lib/tiss/xsd/convert.rb
|
511
512
|
- lib/xsd/class_maker.rb
|
@@ -546,7 +547,7 @@ homepage: https://github.com/marcosgugs/tiss-ruby
|
|
546
547
|
licenses:
|
547
548
|
- MIT
|
548
549
|
metadata: {}
|
549
|
-
post_install_message:
|
550
|
+
post_install_message:
|
550
551
|
rdoc_options: []
|
551
552
|
require_paths:
|
552
553
|
- lib
|
@@ -561,9 +562,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
561
562
|
- !ruby/object:Gem::Version
|
562
563
|
version: '0'
|
563
564
|
requirements: []
|
564
|
-
rubyforge_project:
|
565
|
-
rubygems_version: 2.
|
566
|
-
signing_key:
|
565
|
+
rubyforge_project:
|
566
|
+
rubygems_version: 2.5.1
|
567
|
+
signing_key:
|
567
568
|
specification_version: 4
|
568
569
|
summary: Cria o XML do TISS
|
569
570
|
test_files: []
|