Sha256: 395a5f20564ffbb5565d8c968464a3547482e3b72977944d6f9b2c594cbdc460

Contents?: true

Size: 533 Bytes

Versions: 5

Compression:

Stored size: 533 Bytes

Contents

module Lifen
  module Communication
    class Patient < Lifen::Base

      attribute :first_name, String
      attribute :last_name, String
      attribute :birthdate, Date

      def fhir_payload
        {
          id: "patient",
          resourceType: "Patient",
          name: [
            {
              family: [
                last_name
              ],
              given: [
                first_name
              ]
            }
          ],
          birthDate: birthdate.to_s
        }
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lifen-1.6.8 lib/lifen/communication/patient.rb
lifen-1.6.7 lib/lifen/communication/patient.rb
lifen-1.6.6 lib/lifen/communication/patient.rb
lifen-1.6.5 lib/lifen/communication/patient.rb
lifen-1.6.4 lib/lifen/communication/patient.rb