Class: Prescription
- Inherits:
-
Common::Base
- Object
- Common::Base
- Prescription
- Defined in:
- app/models/prescription.rb
Overview
Models a Prescription
Direct Known Subclasses
Instance Attribute Summary collapse
- #dispensed_date ⇒ Common::UTCTime
- #expiration_date ⇒ Common::UTCTime
- #facility_name ⇒ String
- #is_refillable ⇒ Boolean (also: #refillable?)
- #is_trackable ⇒ Boolean (also: #trackable?)
- #ordered_date ⇒ Common::UTCTime
- #prescription_id ⇒ Integer
- #prescription_name ⇒ String
- #prescription_number ⇒ String
- #quantity ⇒ Integer
- #refill_date ⇒ Common::UTCTime
- #refill_remaining ⇒ Integer
- #refill_status ⇒ String
- #refill_submit_date ⇒ Common::UTCTime
- #station_number ⇒ String
Attributes inherited from Common::Base
Instance Method Summary collapse
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, #initialize, max_per_page, per_page, sortable_attributes
Constructor Details
This class inherits a constructor from Common::Base
Instance Attribute Details
#dispensed_date ⇒ Common::UTCTime
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#expiration_date ⇒ Common::UTCTime
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#facility_name ⇒ String
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#is_refillable ⇒ Boolean Also known as: refillable?
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#is_trackable ⇒ Boolean Also known as: trackable?
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#ordered_date ⇒ Common::UTCTime
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#prescription_id ⇒ Integer
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#prescription_name ⇒ String
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#prescription_number ⇒ String
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#quantity ⇒ Integer
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#refill_date ⇒ Common::UTCTime
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#refill_remaining ⇒ Integer
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#refill_status ⇒ String
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#refill_submit_date ⇒ Common::UTCTime
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
#station_number ⇒ String
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/prescription.rb', line 41 class Prescription < Common::Base attribute :prescription_id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :prescription_image, String attribute :refill_status, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :refill_submit_date, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq not_eq] attribute :refill_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :refill_remaining, Integer attribute :facility_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq] attribute :facility_api_name, String attribute :ordered_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :quantity, Integer attribute :expiration_date, Common::UTCTime, filterable: %w[eq lteq gteq] attribute :prescription_number, String attribute :sig, String attribute :prescription_name, String, sortable: { order: 'ASC', default: true } attribute :dispensed_date, Common::UTCTime, sortable: { order: 'DESC' } attribute :station_number, String attribute :is_refillable, Boolean, filterable: %w[eq not_eq] attribute :is_trackable, Boolean, filterable: %w[eq not_eq] attribute :cmop_division_phone, String alias refillable? is_refillable alias trackable? is_trackable def <=>(other) prescription_id <=> other.prescription_id end end |
Instance Method Details
#<=>(other) ⇒ Object
65 66 67 |
# File 'app/models/prescription.rb', line 65 def <=>(other) prescription_id <=> other.prescription_id end |