change_healthcare 1.0.2 → 1.0.3
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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/change_healthcare/api_client.rb +4 -1
- data/lib/change_healthcare/order.rb +6 -1
- data/lib/change_healthcare/orderable_doc.rb +17 -0
- data/lib/change_healthcare/version.rb +1 -1
- data/lib/change_healthcare.rb +1 -0
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 6d5b3a64b1a4d8c6ac8f394a5f0e81773ec0b3b3e918d11034bd3a2fceec40ea
         | 
| 4 | 
            +
              data.tar.gz: 5939ea9cd5adbb5016b0aae11f6c99c87f9dfa422e7c3b439601ef1894fb1f2f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 56af391f883c18f95bbbf17f28106f2640d8aa79c1de86a58f8baea378436d8db9f79fd95ad15d3378b2f98ac90f6a13f7610affea5f826d0d9c178e128957ed
         | 
| 7 | 
            +
              data.tar.gz: df1569a740200ca2d66d767ae6ee149f2b7d6f525d2f71b10bf9043b93dd7b4b99a111073f015a3e4369ca9a55dc49b25c5e3ac954ca637acbcd1a880c70d9f5
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                change_healthcare (1.0. | 
| 4 | 
            +
                change_healthcare (1.0.3)
         | 
| 5 5 | 
             
                  activesupport (>= 6)
         | 
| 6 6 | 
             
                  nokogiri (>= 1)
         | 
| 7 7 | 
             
                  rest-client (~> 2)
         | 
| @@ -10,7 +10,7 @@ PATH | |
| 10 10 | 
             
            GEM
         | 
| 11 11 | 
             
              remote: https://rubygems.org/
         | 
| 12 12 | 
             
              specs:
         | 
| 13 | 
            -
                activesupport (7.0. | 
| 13 | 
            +
                activesupport (7.0.3)
         | 
| 14 14 | 
             
                  concurrent-ruby (~> 1.0, >= 1.0.2)
         | 
| 15 15 | 
             
                  i18n (>= 1.6, < 2)
         | 
| 16 16 | 
             
                  minitest (>= 5.1)
         | 
| @@ -21,7 +21,10 @@ class ChangeHealthcare::ApiClient | |
| 21 21 | 
             
                builder = Nokogiri::XML::Builder.new do |xml|
         | 
| 22 22 | 
             
                  xml.REQUEST(request_params) do
         | 
| 23 23 | 
             
                    if params.is_a? Hash
         | 
| 24 | 
            -
                       | 
| 24 | 
            +
                      default_object_attributes = {name: object_name, op: operation}
         | 
| 25 | 
            +
                      object_attributes = params.delete(:object_attributes)
         | 
| 26 | 
            +
                      default_object_attributes.merge!(object_attributes) if object_attributes.is_a?(Hash)
         | 
| 27 | 
            +
                      xml.OBJECT(default_object_attributes) do
         | 
| 25 28 | 
             
                        params.each_pair do |k,v|
         | 
| 26 29 | 
             
                          save_element(xml, k, v)
         | 
| 27 30 | 
             
                        end
         | 
| @@ -24,7 +24,7 @@ class ChangeHealthcare::Order < ChangeHealthcare::BaseApiObject | |
| 24 24 | 
             
                  :prepaid_amount, :primaryorderingcaregiver, :ref_cg_fname, :ref_cg_lname, :ref_cg_mname,
         | 
| 25 25 | 
             
                  :ref_cg_npi, :ref_cg_suffix, :ref_cg_upin, :referring_cg_id, :referringcaregiver,
         | 
| 26 26 | 
             
                  :request_date, :room, :seconds_since_transmit, :sex, :stat_flag, :submission_date,
         | 
| 27 | 
            -
                  :suffix, :transmission_date, :username, :work_phone_area_code, :work_phone_ext, :work_phone_number
         | 
| 27 | 
            +
                  :suffix, :transmission_date, :username, :work_phone_area_code, :work_phone_ext, :work_phone_number, :body
         | 
| 28 28 | 
             
                ]
         | 
| 29 29 | 
             
              end
         | 
| 30 30 |  | 
| @@ -34,6 +34,11 @@ class ChangeHealthcare::Order < ChangeHealthcare::BaseApiObject | |
| 34 34 | 
             
                "order"
         | 
| 35 35 | 
             
              end
         | 
| 36 36 |  | 
| 37 | 
            +
              def self.requisitionPdf(params={})
         | 
| 38 | 
            +
                resp = call_api(__method__.to_s, params, false)
         | 
| 39 | 
            +
                response_to_list(resp)
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
             | 
| 37 42 | 
             
              # https://cli-cert.emdeon.com/api/cert/order.html#generate_order_number
         | 
| 38 43 | 
             
              # params = { lab: "1502191", orderingorganization: #{facility} }
         | 
| 39 44 | 
             
              def self.generate_order_number(params={})
         | 
| @@ -0,0 +1,17 @@ | |
| 1 | 
            +
            # https://cli-cert.emdeon.com/api/cert/order.html
         | 
| 2 | 
            +
            class ChangeHealthcare::OrderableDoc < ChangeHealthcare::BaseApiObject
         | 
| 3 | 
            +
              def self.attributes
         | 
| 4 | 
            +
                [:orderable, :document, :orderable_description, :orderabledoc, :order_code]
         | 
| 5 | 
            +
              end
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              attr_accessor(*self.attributes)
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              def self.chc_object_name
         | 
| 10 | 
            +
                "orderabledoc"
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              def self.search_docs_for_order(params={})
         | 
| 14 | 
            +
                resp = call_api(__method__.to_s, params, false)
         | 
| 15 | 
            +
                response_to_list(resp)
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
            end
         | 
    
        data/lib/change_healthcare.rb
    CHANGED
    
    | @@ -18,6 +18,7 @@ require "change_healthcare/provider_caregiver" | |
| 18 18 | 
             
            require "change_healthcare/client_id"
         | 
| 19 19 | 
             
            require "change_healthcare/lab_config"
         | 
| 20 20 | 
             
            require "change_healthcare/order"
         | 
| 21 | 
            +
            require "change_healthcare/orderable_doc"
         | 
| 21 22 | 
             
            require "change_healthcare/person"
         | 
| 22 23 | 
             
            require "change_healthcare/object_doc"
         | 
| 23 24 | 
             
            require "change_healthcare/report"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: change_healthcare
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Saul Moncada
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022-05- | 
| 11 | 
            +
            date: 2022-05-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rest-client
         | 
| @@ -180,6 +180,7 @@ files: | |
| 180 180 | 
             
            - lib/change_healthcare/object_doc.rb
         | 
| 181 181 | 
             
            - lib/change_healthcare/order.rb
         | 
| 182 182 | 
             
            - lib/change_healthcare/order_diagnosis.rb
         | 
| 183 | 
            +
            - lib/change_healthcare/orderable_doc.rb
         | 
| 183 184 | 
             
            - lib/change_healthcare/organization_lab.rb
         | 
| 184 185 | 
             
            - lib/change_healthcare/person.rb
         | 
| 185 186 | 
             
            - lib/change_healthcare/provider_caregiver.rb
         |