module Trizetto::Api::Eligibility::WebService::Rejectable
Rejections appear in a few places in the eligibility response. Any node that can have a rejection should prepend this module
Example
class InfoReciever < Node prepend Rejectable end
Example XML
<infosource> <rejection> <rejectreason>Unable to Respond at Current Time</rejectreason> <followupaction>Resubmission Allowed</followupaction> </rejection> <i/nfosource>
Example XML
<inforeceiver> <rejection> <rejectreason>Provider Not on File</rejectreason> <followupaction>Please Correct and Resubmit</followupaction> </rejection> </inforeceiver>
Example XML
<subscriber> <rejection> <rejectreason>Invalid/Missing Subscriber/Insured Name</rejectreason> <followupaction>Please Correct and Resubmit</followupaction> </rejection> <rejection> <rejectreason>Patient Birth Date Does Not Match That for the Patient on the Database</rejectreason> <followupaction>Please Correct and Resubmit</followupaction> </rejection> </subscriber>
Public Instance Methods
after_inititlize(hash)
click to toggle source
Calls superclass method
# File lib/trizetto/api/eligibility/web_service/rejectable.rb, line 43 def after_inititlize(hash) super(hash) # This is in an openstruct and after inititalize, :rejection in the # hash will have created an accessor, so nil that out here, we're using # rejections (plural) not rejection (singular) self.rejection = nil rejections_xml = hash[:rejection] || [] rejections_xml = [rejections_xml] if rejections_xml.is_a?(Hash) self.rejections = rejections_xml.map do |rejection_xml| Rejection.new(rejection_xml).tap {|r| r.source = self } end end