Authorization Numbers
Some payers require us to ask for a prior authorization number before submitting a claim. This process involves sending a request to the payer, and receiving a response through Fax with an authorization number, a date range range with its validity, and the number of times it can be used.
Authorization Number persistance
finance_authorization_numbers
Name | Type | Nullable |
---|---|---|
chart_id | uuid (charts) | No |
authorized_service | string | No |
valid_from | date | No |
valid_to | date | Yes |
initial_uses | int | Yes |
remaining_uses | int | Yes |
code | string | No |
authorization_type | string | Yes |
Notes
service_type
: is a Rails enum, with possible values encounter
and outreach
.
authorization_type
: Rails enum, with possible values post_service
and pre_service
.
valid_to
: can be null if the authorization code does not expire.
initial_uses
: can be null if the authorization code has unlimited uses.
Add new FK ref to finance_claims
:
Name | Type | Nullable |
---|---|---|
finance_authorization_numbers_id | uuid (finance_authorization_numbers) | Yes |
Usage
class Finance::AuthorizationNumber < ApplicationRecord
scope :valid_at, ->(date) { ... }
scope :usable_in, ->(claim) { ... }
def use_in(claim)
self.remaining_uses -= 1 if remaining_uses.present?
claim.authorization_number = self
save!
end
end
Related code:
Finance::AuthorizationNumber
modelFinance::Claim::Authorizable
module