sunnyside 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/sunnyside +5 -5
- data/lib/sunnyside.rb +35 -35
- data/lib/sunnyside/advanced.rb +84 -84
- data/lib/sunnyside/cash_receipts/cash_receipt.rb +14 -11
- data/lib/sunnyside/expiring_auth.rb +0 -0
- data/lib/sunnyside/ftp.rb +0 -0
- data/lib/sunnyside/ledger/auth_report.rb +0 -0
- data/lib/sunnyside/ledger/edi.rb +174 -174
- data/lib/sunnyside/ledger/ledger.rb +189 -188
- data/lib/sunnyside/ledger/private.rb +0 -0
- data/lib/sunnyside/menu.rb +52 -52
- data/lib/sunnyside/models/db_setup.rb +196 -196
- data/lib/sunnyside/models/sequel_classes.rb +13 -13
- data/lib/sunnyside/query/query.rb +46 -28
- data/lib/sunnyside/reports/mco_mltc.rb +41 -41
- data/lib/sunnyside/reports/pdf_report.rb +1 -1
- data/lib/sunnyside/reports/pdf_report_draft.rb +0 -0
- data/lib/sunnyside/reports/private.rb +0 -0
- data/lib/sunnyside/reports/report.rb +0 -0
- data/lib/sunnyside/version.rb +3 -3
- metadata +21 -35
@@ -1,197 +1,197 @@
|
|
1
|
-
module Sunnyside
|
2
|
-
|
3
|
-
class << self
|
4
|
-
def create_folders
|
5
|
-
folders = ['db', '835', '837', 'summary', 'cash_receipts', 'new-ledger', 'private', 'private/archive',
|
6
|
-
'summary/archive', '837/archive', '835/archive', 'ftp', 'ftp/837', 'ftp/837/GUILDNET', 'ftp/837/CPHL', 'ftp/837/ELDERSERVE',
|
7
|
-
'ftp/835', 'ftp/835/GUILDNET', 'ftp/835/CPHL', 'ftp/835/ELDERSERVE', 'pdf-reports'
|
8
|
-
]
|
9
|
-
Dir.mkdir("#{DRIVE}/sunnyside-files")
|
10
|
-
folders.each { |folder| Dir.mkdir("#{DRIVE}/sunnyside-files/#{folder}") }
|
11
|
-
end
|
12
|
-
|
13
|
-
def create_tables
|
14
|
-
DB.create_table :logins do
|
15
|
-
primary_key :id
|
16
|
-
String :site
|
17
|
-
String :username
|
18
|
-
String :password
|
19
|
-
String :provider
|
20
|
-
end
|
21
|
-
|
22
|
-
DB.create_table :charges do
|
23
|
-
primary_key :id
|
24
|
-
foreign_key :invoice_id, :invoices
|
25
|
-
foreign_key :provider_id, :providers
|
26
|
-
Date :dos
|
27
|
-
Float :amount
|
28
|
-
Float :units
|
29
|
-
String :service_code
|
30
|
-
String :filename
|
31
|
-
end
|
32
|
-
|
33
|
-
DB.create_table :invoices do
|
34
|
-
Integer :invoice_number, :primary_key=>true
|
35
|
-
index :invoice_number
|
36
|
-
Float :amount
|
37
|
-
Date :post_date, :default=>Date.today
|
38
|
-
foreign_key :client_id, :clients
|
39
|
-
foreign_key :provider_id, :providers
|
40
|
-
foreign_key :filelib_id, :filelibs
|
41
|
-
Integer :service_number
|
42
|
-
String :auth
|
43
|
-
String :client_name
|
44
|
-
Float :rate
|
45
|
-
Float :hours
|
46
|
-
String :recipient_id
|
47
|
-
end
|
48
|
-
|
49
|
-
DB.create_table :payments do
|
50
|
-
primary_key :id
|
51
|
-
foreign_key :provider_id, :providers
|
52
|
-
foreign_key :filelib_id, :filelibs
|
53
|
-
Float :check_total
|
54
|
-
Date :post_date, :default=>Date.today
|
55
|
-
String :status
|
56
|
-
Integer :check_number
|
57
|
-
end
|
58
|
-
|
59
|
-
DB.create_table :claims do
|
60
|
-
primary_key :id
|
61
|
-
index :id
|
62
|
-
String :control_number
|
63
|
-
foreign_key :payment_id, :payments
|
64
|
-
foreign_key :invoice_id, :invoices
|
65
|
-
foreign_key :client_id, :clients
|
66
|
-
Float :paid
|
67
|
-
Float :billed
|
68
|
-
String :status
|
69
|
-
String :recipient_id
|
70
|
-
foreign_key :provider_id, :providers
|
71
|
-
Date :post_date
|
72
|
-
end
|
73
|
-
|
74
|
-
DB.create_table :services do
|
75
|
-
primary_key :id
|
76
|
-
foreign_key :claim_id, :claims
|
77
|
-
foreign_key :payment_id, :payments
|
78
|
-
foreign_key :invoice_id, :invoices
|
79
|
-
foreign_key :client_id, :clients
|
80
|
-
String :service_code
|
81
|
-
Float :paid
|
82
|
-
Float :billed
|
83
|
-
String :denial_reason
|
84
|
-
Float :units
|
85
|
-
Date :dos
|
86
|
-
end
|
87
|
-
|
88
|
-
DB.create_table :clients do
|
89
|
-
Integer :client_number, :primary_key=>true
|
90
|
-
String :client_name
|
91
|
-
String :fund_id
|
92
|
-
String :recipient_id
|
93
|
-
foreign_key :provider_id, :providers
|
94
|
-
String :prov_type, :default=>'MLTC'
|
95
|
-
Date :dob
|
96
|
-
end
|
97
|
-
|
98
|
-
DB.create_table :providers do
|
99
|
-
primary_key :id
|
100
|
-
Integer :credit_account
|
101
|
-
Integer :fund
|
102
|
-
Integer :debit_account
|
103
|
-
String :name
|
104
|
-
String :abbreviation
|
105
|
-
String :prov_type
|
106
|
-
String :edi_identifier
|
107
|
-
end
|
108
|
-
|
109
|
-
DB.create_table :filelibs do
|
110
|
-
primary_key :id
|
111
|
-
String :filename
|
112
|
-
String :purpose
|
113
|
-
String :file_type
|
114
|
-
Time :created_at
|
115
|
-
end
|
116
|
-
|
117
|
-
DB.create_table :visits do
|
118
|
-
primary_key :id
|
119
|
-
String :service_code
|
120
|
-
String :modifier
|
121
|
-
foreign_key :invoice_id, :invoices
|
122
|
-
foreign_key :client_id, :clients
|
123
|
-
Float :amount
|
124
|
-
Float :units
|
125
|
-
Date :dos
|
126
|
-
end
|
127
|
-
|
128
|
-
DB.create_table :denials do
|
129
|
-
primary_key :denial_code, :primary_key=>true
|
130
|
-
String :denial_explanation
|
131
|
-
end
|
132
|
-
|
133
|
-
DB.create_table :authorizations do
|
134
|
-
primary_key :id
|
135
|
-
String :auth
|
136
|
-
foreign_key :client_id, :clients
|
137
|
-
Integer :service_id
|
138
|
-
Date :start_date
|
139
|
-
Date :end_date
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
def add_denial_data
|
144
|
-
# CSV.foreach('examples/denial_data.csv', 'r') { |row| DB[:denials].insert(denial_code: row[0], denial_explanation: row[1]) }
|
145
|
-
end
|
146
|
-
|
147
|
-
def add_providers
|
148
|
-
DB[:providers].insert(:credit_account=>1206, :fund=>500, :debit_account=>5005, :name=>"AMERIGROUP 2", :abbreviation=>"AMG", :prov_type=>"MCO")
|
149
|
-
DB[:providers].insert(:credit_account=>1207, :fund=>300, :debit_account=>5007, :name=>"CHILDREN'S AID SOCIETY", :abbreviation=>"CAS", :prov_type=>"MLTC")
|
150
|
-
DB[:providers].insert(:credit_account=>1226, :fund=>300, :debit_account=>5026, :name=>"COMPREHENSIVE CARE MANAGEMENT", :abbreviation=>"CCM", :prov_type=>"MLTC")
|
151
|
-
DB[:providers].insert(:credit_account=>1203, :fund=>300, :debit_account=>5002, :name=>"DOMINICAN SISTERS FAM HLTH", :abbreviation=>"DSF", :prov_type=>"MLTC")
|
152
|
-
DB[:providers].insert(:credit_account=>1209, :fund=>300, :debit_account=>5009, :name=>"ELDERSERVE HEALTH", :abbreviation=>"ELD", :prov_type=>"MLTC")
|
153
|
-
DB[:providers].insert(:credit_account=>1212, :fund=>300, :debit_account=>5012, :name=>"EMBLEM HEALTH", :abbreviation=>"EMB", :prov_type=>"MLTC")
|
154
|
-
DB[:providers].insert(:credit_account=>1201, :fund=>300, :debit_account=>5001, :name=>"GUILDNET", :abbreviation=>"G", :prov_type=>"MLTC")
|
155
|
-
DB[:providers].insert(:credit_account=>1227, :fund=>500, :debit_account=>5027, :name=>"HEALTH CARE PARTNERS", :abbreviation=>"HCP", :prov_type=>"MCO")
|
156
|
-
DB[:providers].insert(:credit_account=>1218, :fund=>500, :debit_account=>5018, :name=>"HEALTH FIRST", :abbreviation=>"HFS", :prov_type=>"MCO")
|
157
|
-
DB[:providers].insert(:credit_account=>1216, :fund=>500, :debit_account=>5016, :name=>"HEALTH INSURANCE PLAN OF NY", :abbreviation=>"HIP", :prov_type=>"MCO")
|
158
|
-
DB[:providers].insert(:credit_account=>1223, :fund=>300, :debit_account=>5023, :name=>"HHH LONG TERM HOME HLTH CARE", :abbreviation=>"HHH", :prov_type=>"MLTC")
|
159
|
-
DB[:providers].insert(:credit_account=>1228, :fund=>300, :debit_account=>5028, :name=>"INDEPENDENCE CARE SYSTEMS", :abbreviation=>"ICS", :prov_type=>"MLTC")
|
160
|
-
DB[:providers].insert(:credit_account=>1217, :fund=>500, :debit_account=>5017, :name=>"METROPLUS HEALTH", :abbreviation=>"MPH", :prov_type=>"MCO")
|
161
|
-
DB[:providers].insert(:credit_account=>1219, :fund=>500, :debit_account=>5019, :name=>"NEIGHBORHOOD HEALTH PROVIDERS", :abbreviation=>"NHP", :prov_type=>"MCO")
|
162
|
-
DB[:providers].insert(:credit_account=>1221, :fund=>500, :debit_account=>5021, :name=>"NYS CATHOLIC/FIDELIS", :abbreviation=>"FID", :prov_type=>"MCO")
|
163
|
-
DB[:providers].insert(:credit_account=>1200, :fund=>300, :debit_account=>5000, :name=>"PRIVATE", :abbreviation=>"P", :prov_type=>"MLTC")
|
164
|
-
DB[:providers].insert(:credit_account=>1204, :fund=>300, :debit_account=>5004, :name=>"SENIOR HEALTH PARTNERS", :abbreviation=>"SHP", :prov_type=>"MLTC")
|
165
|
-
DB[:providers].insert(:credit_account=>1202, :fund=>300, :debit_account=>5003, :name=>"SUNNYSIDE COMMUNITY SERVICES", :abbreviation=>"SCS", :prov_type=>"MLTC")
|
166
|
-
DB[:providers].insert(:credit_account=>1213, :fund=>500, :debit_account=>5013, :name=>"UNITED HEALTH CARE", :abbreviation=>"UHC", :prov_type=>"MCO")
|
167
|
-
DB[:providers].insert(:credit_account=>1229, :fund=>500, :debit_account=>5029, :name=>"VNSNY CHOICE SELECT HEALTH", :abbreviation=>"VCS", :prov_type=>"MCO")
|
168
|
-
DB[:providers].insert(:credit_account=>1224, :fund=>500, :debit_account=>5024, :name=>"WELCARE OF NEW YORK, INC.", :abbreviation=>"WEL", :prov_type=>"MCO")
|
169
|
-
DB[:providers].insert(:credit_account=>1310, :fund=>300, :debit_account=>5030, :name=>"VILLAGE CARE MAX", :abbreviation=>"VIL", :prov_type=>"MLTC")
|
170
|
-
DB[:providers].insert(:credit_account=>1222, :fund=>500, :debit_account=>5022, :name=>"AFFINITY HEALTH PLUS", :abbreviation=>"AFF", :prov_type=>"MCO")
|
171
|
-
DB[:providers].insert(:credit_account=>1218, :fund=>500, :debit_account=>5018, :name=>"HEALTH PLUS PHSP,INC", :abbreviation=>"HFS", :prov_type=>"MCO")
|
172
|
-
end
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
# DB[:denials].insert(denial_code: 1, denial_explanation: 'not implemented yet')
|
177
|
-
# DB[:denials].insert(denial_code: 96, denial_explanation: "NO AUTHORIZATION FOR DOS")
|
178
|
-
# DB[:denials].insert(denial_code: 197, denial_explanation: "Precertification/authorization/notification absent")
|
179
|
-
# DB[:denials].insert(denial_code: 198, denial_explanation: "Precertification/authorization exceeded")
|
180
|
-
# DB[:denials].insert(denial_code: 199, denial_explanation: "Revenue code and Procedure code do not match")
|
181
|
-
# DB[:denials].insert(denial_code: 9, denial_explanation: "DIAGNOSIS ISSUE")
|
182
|
-
# DB[:denials].insert(denial_code: 15, denial_explanation: "AUTHORIZATION MISSING/INVALID")
|
183
|
-
# DB[:denials].insert (denial_code: 18, denial_explanation: "Exact Duplicate Claim/Service")
|
184
|
-
# DB[:denials].insert(denial_code: 19, denial_explanation: "Expenses incurred prior to coverage")
|
185
|
-
# DB[:denials].insert(denial_code: 27, denial_explanation: "Expenses incurred after coverage terminated")
|
186
|
-
# DB[:denials].insert(denial_code: 29, denial_explanation: "Timely Filing")
|
187
|
-
# DB[:denials].insert(denial_code: 39, denial_explanation: "Services denied at the time authorization/pre-certification was requested")
|
188
|
-
# DB[:denials].insert(denial_code: 45, denial_explanation: "Charge exceeds fee schedule/maximum allowable")
|
189
|
-
# DB[:denials].insert(denial_code: 16, denial_explanation: "Claim/service lacks information which is needed for adjudication")
|
190
|
-
# DB[:denials].insert(denial_code: 50, denial_explanation: "These are non-covered services because this is not deemed a 'medical necessity' by the payer")
|
191
|
-
# DB[:denials].insert(denial_code: 192, denial_explanation: "Non standard adjustment code from paper remittance")
|
192
|
-
# DB[:denials].insert(denial_code: 181, denial_explanation: "Procedure code was invalid on the date of service")
|
193
|
-
# DB[:denials].insert(denial_code: 182, denial_explanation: "Procedure modifier was invalid on the date of service")
|
194
|
-
# DB[:denials].insert(denial_code: 204, denial_explanation: "This service/equipment/drug is not covered under the patients current benefit plan")
|
195
|
-
# DB[:denials].insert(denial_code: 151, denial_explanation: "151 Payment adjusted because the payer deems the information submitted does not support this many/frequency of services")
|
196
|
-
# DB[:denials].insert(denial_code: 177, denial_explanation: "Patient has not met the required eligibility requirements")
|
1
|
+
module Sunnyside
|
2
|
+
|
3
|
+
class << self
|
4
|
+
def create_folders
|
5
|
+
folders = ['db', '835', '837', 'summary', 'cash_receipts', 'new-ledger', 'private', 'private/archive',
|
6
|
+
'summary/archive', '837/archive', '835/archive', 'ftp', 'ftp/837', 'ftp/837/GUILDNET', 'ftp/837/CPHL', 'ftp/837/ELDERSERVE',
|
7
|
+
'ftp/835', 'ftp/835/GUILDNET', 'ftp/835/CPHL', 'ftp/835/ELDERSERVE', 'pdf-reports'
|
8
|
+
]
|
9
|
+
Dir.mkdir("#{DRIVE}/sunnyside-files")
|
10
|
+
folders.each { |folder| Dir.mkdir("#{DRIVE}/sunnyside-files/#{folder}") }
|
11
|
+
end
|
12
|
+
|
13
|
+
def create_tables
|
14
|
+
DB.create_table :logins do
|
15
|
+
primary_key :id
|
16
|
+
String :site
|
17
|
+
String :username
|
18
|
+
String :password
|
19
|
+
String :provider
|
20
|
+
end
|
21
|
+
|
22
|
+
DB.create_table :charges do
|
23
|
+
primary_key :id
|
24
|
+
foreign_key :invoice_id, :invoices
|
25
|
+
foreign_key :provider_id, :providers
|
26
|
+
Date :dos
|
27
|
+
Float :amount
|
28
|
+
Float :units
|
29
|
+
String :service_code
|
30
|
+
String :filename
|
31
|
+
end
|
32
|
+
|
33
|
+
DB.create_table :invoices do
|
34
|
+
Integer :invoice_number, :primary_key=>true
|
35
|
+
index :invoice_number
|
36
|
+
Float :amount
|
37
|
+
Date :post_date, :default=>Date.today
|
38
|
+
foreign_key :client_id, :clients
|
39
|
+
foreign_key :provider_id, :providers
|
40
|
+
foreign_key :filelib_id, :filelibs
|
41
|
+
Integer :service_number
|
42
|
+
String :auth
|
43
|
+
String :client_name
|
44
|
+
Float :rate
|
45
|
+
Float :hours
|
46
|
+
String :recipient_id
|
47
|
+
end
|
48
|
+
|
49
|
+
DB.create_table :payments do
|
50
|
+
primary_key :id
|
51
|
+
foreign_key :provider_id, :providers
|
52
|
+
foreign_key :filelib_id, :filelibs
|
53
|
+
Float :check_total
|
54
|
+
Date :post_date, :default=>Date.today
|
55
|
+
String :status
|
56
|
+
Integer :check_number
|
57
|
+
end
|
58
|
+
|
59
|
+
DB.create_table :claims do
|
60
|
+
primary_key :id
|
61
|
+
index :id
|
62
|
+
String :control_number
|
63
|
+
foreign_key :payment_id, :payments
|
64
|
+
foreign_key :invoice_id, :invoices
|
65
|
+
foreign_key :client_id, :clients
|
66
|
+
Float :paid
|
67
|
+
Float :billed
|
68
|
+
String :status
|
69
|
+
String :recipient_id
|
70
|
+
foreign_key :provider_id, :providers
|
71
|
+
Date :post_date
|
72
|
+
end
|
73
|
+
|
74
|
+
DB.create_table :services do
|
75
|
+
primary_key :id
|
76
|
+
foreign_key :claim_id, :claims
|
77
|
+
foreign_key :payment_id, :payments
|
78
|
+
foreign_key :invoice_id, :invoices
|
79
|
+
foreign_key :client_id, :clients
|
80
|
+
String :service_code
|
81
|
+
Float :paid
|
82
|
+
Float :billed
|
83
|
+
String :denial_reason
|
84
|
+
Float :units
|
85
|
+
Date :dos
|
86
|
+
end
|
87
|
+
|
88
|
+
DB.create_table :clients do
|
89
|
+
Integer :client_number, :primary_key=>true
|
90
|
+
String :client_name
|
91
|
+
String :fund_id
|
92
|
+
String :recipient_id
|
93
|
+
foreign_key :provider_id, :providers
|
94
|
+
String :prov_type, :default=>'MLTC'
|
95
|
+
Date :dob
|
96
|
+
end
|
97
|
+
|
98
|
+
DB.create_table :providers do
|
99
|
+
primary_key :id
|
100
|
+
Integer :credit_account
|
101
|
+
Integer :fund
|
102
|
+
Integer :debit_account
|
103
|
+
String :name
|
104
|
+
String :abbreviation
|
105
|
+
String :prov_type
|
106
|
+
String :edi_identifier
|
107
|
+
end
|
108
|
+
|
109
|
+
DB.create_table :filelibs do
|
110
|
+
primary_key :id
|
111
|
+
String :filename
|
112
|
+
String :purpose
|
113
|
+
String :file_type
|
114
|
+
Time :created_at
|
115
|
+
end
|
116
|
+
|
117
|
+
DB.create_table :visits do
|
118
|
+
primary_key :id
|
119
|
+
String :service_code
|
120
|
+
String :modifier
|
121
|
+
foreign_key :invoice_id, :invoices
|
122
|
+
foreign_key :client_id, :clients
|
123
|
+
Float :amount
|
124
|
+
Float :units
|
125
|
+
Date :dos
|
126
|
+
end
|
127
|
+
|
128
|
+
DB.create_table :denials do
|
129
|
+
primary_key :denial_code, :primary_key=>true
|
130
|
+
String :denial_explanation
|
131
|
+
end
|
132
|
+
|
133
|
+
DB.create_table :authorizations do
|
134
|
+
primary_key :id
|
135
|
+
String :auth
|
136
|
+
foreign_key :client_id, :clients
|
137
|
+
Integer :service_id
|
138
|
+
Date :start_date
|
139
|
+
Date :end_date
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
def add_denial_data
|
144
|
+
# CSV.foreach('examples/denial_data.csv', 'r') { |row| DB[:denials].insert(denial_code: row[0], denial_explanation: row[1]) }
|
145
|
+
end
|
146
|
+
|
147
|
+
def add_providers
|
148
|
+
DB[:providers].insert(:credit_account=>1206, :fund=>500, :debit_account=>5005, :name=>"AMERIGROUP 2", :abbreviation=>"AMG", :prov_type=>"MCO")
|
149
|
+
DB[:providers].insert(:credit_account=>1207, :fund=>300, :debit_account=>5007, :name=>"CHILDREN'S AID SOCIETY", :abbreviation=>"CAS", :prov_type=>"MLTC")
|
150
|
+
DB[:providers].insert(:credit_account=>1226, :fund=>300, :debit_account=>5026, :name=>"COMPREHENSIVE CARE MANAGEMENT", :abbreviation=>"CCM", :prov_type=>"MLTC")
|
151
|
+
DB[:providers].insert(:credit_account=>1203, :fund=>300, :debit_account=>5002, :name=>"DOMINICAN SISTERS FAM HLTH", :abbreviation=>"DSF", :prov_type=>"MLTC")
|
152
|
+
DB[:providers].insert(:credit_account=>1209, :fund=>300, :debit_account=>5009, :name=>"ELDERSERVE HEALTH", :abbreviation=>"ELD", :prov_type=>"MLTC")
|
153
|
+
DB[:providers].insert(:credit_account=>1212, :fund=>300, :debit_account=>5012, :name=>"EMBLEM HEALTH", :abbreviation=>"EMB", :prov_type=>"MLTC")
|
154
|
+
DB[:providers].insert(:credit_account=>1201, :fund=>300, :debit_account=>5001, :name=>"GUILDNET", :abbreviation=>"G", :prov_type=>"MLTC")
|
155
|
+
DB[:providers].insert(:credit_account=>1227, :fund=>500, :debit_account=>5027, :name=>"HEALTH CARE PARTNERS", :abbreviation=>"HCP", :prov_type=>"MCO")
|
156
|
+
DB[:providers].insert(:credit_account=>1218, :fund=>500, :debit_account=>5018, :name=>"HEALTH FIRST", :abbreviation=>"HFS", :prov_type=>"MCO")
|
157
|
+
DB[:providers].insert(:credit_account=>1216, :fund=>500, :debit_account=>5016, :name=>"HEALTH INSURANCE PLAN OF NY", :abbreviation=>"HIP", :prov_type=>"MCO")
|
158
|
+
DB[:providers].insert(:credit_account=>1223, :fund=>300, :debit_account=>5023, :name=>"HHH LONG TERM HOME HLTH CARE", :abbreviation=>"HHH", :prov_type=>"MLTC")
|
159
|
+
DB[:providers].insert(:credit_account=>1228, :fund=>300, :debit_account=>5028, :name=>"INDEPENDENCE CARE SYSTEMS", :abbreviation=>"ICS", :prov_type=>"MLTC")
|
160
|
+
DB[:providers].insert(:credit_account=>1217, :fund=>500, :debit_account=>5017, :name=>"METROPLUS HEALTH", :abbreviation=>"MPH", :prov_type=>"MCO")
|
161
|
+
DB[:providers].insert(:credit_account=>1219, :fund=>500, :debit_account=>5019, :name=>"NEIGHBORHOOD HEALTH PROVIDERS", :abbreviation=>"NHP", :prov_type=>"MCO")
|
162
|
+
DB[:providers].insert(:credit_account=>1221, :fund=>500, :debit_account=>5021, :name=>"NYS CATHOLIC/FIDELIS", :abbreviation=>"FID", :prov_type=>"MCO")
|
163
|
+
DB[:providers].insert(:credit_account=>1200, :fund=>300, :debit_account=>5000, :name=>"PRIVATE", :abbreviation=>"P", :prov_type=>"MLTC")
|
164
|
+
DB[:providers].insert(:credit_account=>1204, :fund=>300, :debit_account=>5004, :name=>"SENIOR HEALTH PARTNERS", :abbreviation=>"SHP", :prov_type=>"MLTC")
|
165
|
+
DB[:providers].insert(:credit_account=>1202, :fund=>300, :debit_account=>5003, :name=>"SUNNYSIDE COMMUNITY SERVICES", :abbreviation=>"SCS", :prov_type=>"MLTC")
|
166
|
+
DB[:providers].insert(:credit_account=>1213, :fund=>500, :debit_account=>5013, :name=>"UNITED HEALTH CARE", :abbreviation=>"UHC", :prov_type=>"MCO")
|
167
|
+
DB[:providers].insert(:credit_account=>1229, :fund=>500, :debit_account=>5029, :name=>"VNSNY CHOICE SELECT HEALTH", :abbreviation=>"VCS", :prov_type=>"MCO")
|
168
|
+
DB[:providers].insert(:credit_account=>1224, :fund=>500, :debit_account=>5024, :name=>"WELCARE OF NEW YORK, INC.", :abbreviation=>"WEL", :prov_type=>"MCO")
|
169
|
+
DB[:providers].insert(:credit_account=>1310, :fund=>300, :debit_account=>5030, :name=>"VILLAGE CARE MAX", :abbreviation=>"VIL", :prov_type=>"MLTC")
|
170
|
+
DB[:providers].insert(:credit_account=>1222, :fund=>500, :debit_account=>5022, :name=>"AFFINITY HEALTH PLUS", :abbreviation=>"AFF", :prov_type=>"MCO")
|
171
|
+
DB[:providers].insert(:credit_account=>1218, :fund=>500, :debit_account=>5018, :name=>"HEALTH PLUS PHSP,INC", :abbreviation=>"HFS", :prov_type=>"MCO")
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# DB[:denials].insert(denial_code: 1, denial_explanation: 'not implemented yet')
|
177
|
+
# DB[:denials].insert(denial_code: 96, denial_explanation: "NO AUTHORIZATION FOR DOS")
|
178
|
+
# DB[:denials].insert(denial_code: 197, denial_explanation: "Precertification/authorization/notification absent")
|
179
|
+
# DB[:denials].insert(denial_code: 198, denial_explanation: "Precertification/authorization exceeded")
|
180
|
+
# DB[:denials].insert(denial_code: 199, denial_explanation: "Revenue code and Procedure code do not match")
|
181
|
+
# DB[:denials].insert(denial_code: 9, denial_explanation: "DIAGNOSIS ISSUE")
|
182
|
+
# DB[:denials].insert(denial_code: 15, denial_explanation: "AUTHORIZATION MISSING/INVALID")
|
183
|
+
# DB[:denials].insert (denial_code: 18, denial_explanation: "Exact Duplicate Claim/Service")
|
184
|
+
# DB[:denials].insert(denial_code: 19, denial_explanation: "Expenses incurred prior to coverage")
|
185
|
+
# DB[:denials].insert(denial_code: 27, denial_explanation: "Expenses incurred after coverage terminated")
|
186
|
+
# DB[:denials].insert(denial_code: 29, denial_explanation: "Timely Filing")
|
187
|
+
# DB[:denials].insert(denial_code: 39, denial_explanation: "Services denied at the time authorization/pre-certification was requested")
|
188
|
+
# DB[:denials].insert(denial_code: 45, denial_explanation: "Charge exceeds fee schedule/maximum allowable")
|
189
|
+
# DB[:denials].insert(denial_code: 16, denial_explanation: "Claim/service lacks information which is needed for adjudication")
|
190
|
+
# DB[:denials].insert(denial_code: 50, denial_explanation: "These are non-covered services because this is not deemed a 'medical necessity' by the payer")
|
191
|
+
# DB[:denials].insert(denial_code: 192, denial_explanation: "Non standard adjustment code from paper remittance")
|
192
|
+
# DB[:denials].insert(denial_code: 181, denial_explanation: "Procedure code was invalid on the date of service")
|
193
|
+
# DB[:denials].insert(denial_code: 182, denial_explanation: "Procedure modifier was invalid on the date of service")
|
194
|
+
# DB[:denials].insert(denial_code: 204, denial_explanation: "This service/equipment/drug is not covered under the patients current benefit plan")
|
195
|
+
# DB[:denials].insert(denial_code: 151, denial_explanation: "151 Payment adjusted because the payer deems the information submitted does not support this many/frequency of services")
|
196
|
+
# DB[:denials].insert(denial_code: 177, denial_explanation: "Patient has not met the required eligibility requirements")
|
197
197
|
# DB[:denials].insert(denial_code: 109, denial_explanation: "Claim/service not covered by this payer/contractor. You must send the claim/service to the correct payer/contractor.")
|
@@ -1,14 +1,14 @@
|
|
1
|
-
module Sunnyside
|
2
|
-
class Auth < Sequel::Model; end
|
3
|
-
class Charge < Sequel::Model; end
|
4
|
-
class Invoice < Sequel::Model; end
|
5
|
-
class Filelib < Sequel::Model; end
|
6
|
-
class Payment < Sequel::Model; end
|
7
|
-
class Claim < Sequel::Model; end
|
8
|
-
class Client < Sequel::Model; end
|
9
|
-
class Service < Sequel::Model; end
|
10
|
-
class Provider < Sequel::Model; end
|
11
|
-
class Visit < Sequel::Model; end
|
12
|
-
class Denial < Sequel::Model; end
|
13
|
-
class Login < Sequel::Model; end
|
1
|
+
module Sunnyside
|
2
|
+
class Auth < Sequel::Model; end
|
3
|
+
class Charge < Sequel::Model; end
|
4
|
+
class Invoice < Sequel::Model; end
|
5
|
+
class Filelib < Sequel::Model; end
|
6
|
+
class Payment < Sequel::Model; end
|
7
|
+
class Claim < Sequel::Model; end
|
8
|
+
class Client < Sequel::Model; end
|
9
|
+
class Service < Sequel::Model; end
|
10
|
+
class Provider < Sequel::Model; end
|
11
|
+
class Visit < Sequel::Model; end
|
12
|
+
class Denial < Sequel::Model; end
|
13
|
+
class Login < Sequel::Model; end
|
14
14
|
end
|
@@ -1,29 +1,47 @@
|
|
1
|
-
# definitely a work in progress.
|
2
|
-
|
3
|
-
module Sunnyside
|
4
|
-
|
5
|
-
def self.query
|
6
|
-
puts "1.)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
1
|
+
# definitely a work in progress.
|
2
|
+
|
3
|
+
module Sunnyside
|
4
|
+
|
5
|
+
def self.query
|
6
|
+
puts "1.) VIEW CLIENTS BY PROVIDER"
|
7
|
+
puts "2.) "
|
8
|
+
case gets.chomp
|
9
|
+
when '1'
|
10
|
+
Provder.all.each { |prov| puts "#{prov.id}: #{prov.name}"}
|
11
|
+
print "Type in the provider ID number: "
|
12
|
+
provider = Provider[gets.chomp]
|
13
|
+
query = Query.new(provider)
|
14
|
+
query.show_options
|
15
|
+
# puts 'Type in post date (YYYY-MM-DD)'
|
16
|
+
# date = Date.parse(gets.chomp)
|
17
|
+
# if date.is_a?(Date)
|
18
|
+
# Invoice.where(post_date: date).all.each { |invoice| Sunnyside.payable_csv(invoice, date) }
|
19
|
+
# end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Query
|
24
|
+
attr_reader :type
|
25
|
+
include Sunnyside
|
26
|
+
|
27
|
+
def initialize(type)
|
28
|
+
@type = type
|
29
|
+
end
|
30
|
+
|
31
|
+
def show_options
|
32
|
+
if type.is_a?(Provider)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def primary_id
|
37
|
+
end
|
38
|
+
|
39
|
+
def ledger_file
|
40
|
+
puts 'Type in post date (YYYY-MM-DD)'
|
41
|
+
date = Date.parse(gets.chomp)
|
42
|
+
if date.is_a?(Date)
|
43
|
+
Invoice.where(post_date: date).all.each { |invoice| self.payable_csv(invoice, date) }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
29
47
|
end
|